diff --git a/YTManager/Controllers/ValuesController.cs b/YTManager/Controllers/ValuesController.cs index 7bf69c7..ab254b6 100644 --- a/YTManager/Controllers/ValuesController.cs +++ b/YTManager/Controllers/ValuesController.cs @@ -69,21 +69,11 @@ namespace YTManager.Controllers { return Ok(); } - // PUT api/values/5 - [HttpPut("{id}")] - public void Put(int id, [FromBody]JObject value) - { - Models.Channel posted = value.ToObject(); - posted.ChannelId = id; // Ensure an id is attached - _context.Channels.Update(posted); - _context.SaveChanges(); - } - - // DELETE api/values/5 + // DELETE api/Channels/5 [HttpDelete("{id}")] - public void Delete(int id) + public void Delete(string id) { - _context.Remove(_context.Channels.Single(m => m.ChannelId == id)); + _context.Remove(_context.Channels.Single(m => m.YTChannelID == id)); _context.SaveChanges(); } } diff --git a/YTManager/wwwroot/admin.js b/YTManager/wwwroot/admin.js index 74265b2..8b69d70 100644 --- a/YTManager/wwwroot/admin.js +++ b/YTManager/wwwroot/admin.js @@ -127,7 +127,7 @@ var tbody0 = new Vue({ Title Description ID - Update + Actions @@ -136,7 +136,10 @@ var tbody0 = new Vue({ {{entry.title}} {{entry.description}} {{entry.channelId}} -