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 });