mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 17:22:15 +00:00
hopefully fix /Manage/SetAvatar
This commit is contained in:
parent
cc107c23d0
commit
7805d69917
1 changed files with 2 additions and 1 deletions
|
@ -23,7 +23,8 @@ public ManageController()
|
|||
public ActionResult SetAvatar(string id)
|
||||
{
|
||||
var db = new ApplicationDbContext();
|
||||
var usr = db.Users.FirstOrDefault(x => x.Id == User.Identity.GetUserId());
|
||||
string uid = User.Identity.GetUserId();
|
||||
var usr = db.Users.FirstOrDefault(x => x.Id == uid);
|
||||
var avtr = db.UserAvatars.FirstOrDefault(x => x.Id == id);
|
||||
usr.AvatarUrl = avtr.AvatarUrl;
|
||||
db.SaveChanges();
|
||||
|
|
Loading…
Reference in a new issue