From 922657223116fd89555fa026ac9d0ef10bb403db Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 23 May 2017 18:19:43 -0400 Subject: [PATCH] fix up/downvoting of contest entries --- Project-Unite/Controllers/ContestsController.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Project-Unite/Controllers/ContestsController.cs b/Project-Unite/Controllers/ContestsController.cs index 1cc7070..bb60013 100644 --- a/Project-Unite/Controllers/ContestsController.cs +++ b/Project-Unite/Controllers/ContestsController.cs @@ -87,6 +87,7 @@ public ActionResult Upvote(string id) like.IsDislike = false; like.User = uid; like.Topic = id; + db.Likes.Add(like); } db.SaveChanges(); return RedirectToAction("ViewSubmission", new { id = id }); @@ -115,6 +116,7 @@ public ActionResult Downvote(string id) like.IsDislike = true; like.User = uid; like.Topic = id; + db.Likes.Add(like); } db.SaveChanges(); return RedirectToAction("ViewSubmission", new { id = id });