From 6245822bee2dd31dc0e744526d1971028d771e97 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 24 Mar 2017 11:56:26 -0400 Subject: [PATCH] Bug fix Fix issue where (dis)liking a user's post causes a redirect to your own profile. --- Project-Unite/Controllers/ProfilesController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Project-Unite/Controllers/ProfilesController.cs b/Project-Unite/Controllers/ProfilesController.cs index 5140296..46b9e80 100644 --- a/Project-Unite/Controllers/ProfilesController.cs +++ b/Project-Unite/Controllers/ProfilesController.cs @@ -60,7 +60,7 @@ public ActionResult DislikePosts(string id) db.Likes.Add(like); } db.SaveChanges(); - return RedirectToAction("ViewProfile", new { id = ACL.UserNameRaw(uid) }); + return RedirectToAction("ViewProfile", new { id = ACL.UserNameRaw(topic.UserId) }); } @@ -97,7 +97,7 @@ public ActionResult LikePost(string id) db.Likes.Add(like); } db.SaveChanges(); - return RedirectToAction("ViewProfile", new { id = ACL.UserNameRaw(uid) }); + return RedirectToAction("ViewProfile", new { id = ACL.UserNameRaw(topic.UserId) }); }