diff --git a/Models/Enums.cs b/Models/Enums.cs
index 40487e4..9cc016d 100644
--- a/Models/Enums.cs
+++ b/Models/Enums.cs
@@ -45,7 +45,7 @@ public static class Enumerations
Type type = enumerationValue.GetType();
if (!type.IsEnum)
{
- throw new ArgumentException("EnumerationValue must be of Enum type", "enumerationValue");
+ throw new ArgumentException("EnumerationValue must be of Enum type", nameof(enumerationValue));
}
//Tries to find a DescriptionAttribute for a potential friendly name
diff --git a/WebInterface/Controllers/ChannelsController.cs b/WebInterface/Controllers/ChannelsController.cs
index 1e0efeb..326376a 100644
--- a/WebInterface/Controllers/ChannelsController.cs
+++ b/WebInterface/Controllers/ChannelsController.cs
@@ -1,3 +1,4 @@
+using System.ComponentModel;
using System.Diagnostics;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
diff --git a/WebInterface/Views/Channels/Details.cshtml b/WebInterface/Views/Channels/Details.cshtml
index 7c35fe5..b35024b 100644
--- a/WebInterface/Views/Channels/Details.cshtml
+++ b/WebInterface/Views/Channels/Details.cshtml
@@ -1,3 +1,5 @@
+@using System.ComponentModel
+@using Newtonsoft.Json
@model Channel
@Html.Raw(ViewData["breadcrumbs"])
@@ -10,11 +12,19 @@
+
+
+@section Scripts{
+
+}
\ No newline at end of file
diff --git a/wwwroot/js/site.js b/wwwroot/js/site.js
index b2f58e1..ad5f755 100644
--- a/wwwroot/js/site.js
+++ b/wwwroot/js/site.js
@@ -2,3 +2,49 @@
// for details on configuring this project to bundle and minify static web assets.
// Write your JavaScript code.
+
+function testfunct(caller){
+ console.log("[gibberish]");
+ console.log(caller);
+}
+function postmodelupdate(model)
+{
+ //structure the model your (dang) self into a nice object
+ console.log(model);
+ //i know the page url.
+ console.log(window.location.pathname);
+ var components = window.location.pathname.split('/');
+ if(components[2] !== "Details")
+ {
+ console.log("wtf are you doing? " + components[2] + " is something other than Details")
+ }
+ var type=components[1];
+ var id=components[3];
+
+ //todo: figure out what the URL actually needs to be, rather than assuming you get a whole-ass server to yourself.
+ //you selfish fuck. What are you, fox?
+ var apiUrl = "/api/Channels/"
+
+ console.log("dexter impression: I am now ready to post the following content:");
+ console.log(JSON.stringify(model));
+ fetch(apiUrl, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify(model),
+ })
+ .then(response => {
+ if (!response.ok) {
+ throw new Error('Network response was not "ok". which is not ok.');
+ }
+ return response.json();
+ })
+ .then(returnedSuccessdata => {
+ // perhaps a success callback
+ console.log('returnedSuccessdata:', returnedSuccessdata);
+ })
+ .catch(error => {
+ console.error('Error:', error);
+ });
+}
\ No newline at end of file