mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
feat: implement user update functionality by UUID and add validation to UpdateUserRequest
This commit is contained in:
@@ -39,5 +39,12 @@ namespace SharpbinV3.Server.Services
|
||||
query = query.Include(u => u.Pastes);
|
||||
return query.FirstOrDefaultAsync(u => u.Email == email);
|
||||
}
|
||||
|
||||
public async Task<User> Update(User user)
|
||||
{
|
||||
_db.Users.Update(user);
|
||||
await _db.SaveChangesAsync();
|
||||
return user;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user