mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 03:11:48 -05:00
fix up/downvoting of contest entries
This commit is contained in:
parent
e3aa2149da
commit
9226572231
1 changed files with 2 additions and 0 deletions
|
@ -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 });
|
||||
|
|
Loading…
Reference in a new issue