Fix issue where (dis)liking a user's post causes a redirect to your own
profile.
This commit is contained in:
Michael 2017-03-24 11:56:26 -04:00
parent 0b2469ee1c
commit 6245822bee

View file

@ -60,7 +60,7 @@ public ActionResult DislikePosts(string id)
db.Likes.Add(like); db.Likes.Add(like);
} }
db.SaveChanges(); 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.Likes.Add(like);
} }
db.SaveChanges(); db.SaveChanges();
return RedirectToAction("ViewProfile", new { id = ACL.UserNameRaw(uid) }); return RedirectToAction("ViewProfile", new { id = ACL.UserNameRaw(topic.UserId) });
} }