Add user avatar URL
This commit is contained in:
@@ -74,5 +74,18 @@ public class UserController : BaseController
|
||||
var updatedUser = await _userService.UpdateAgentName(user, agentName);
|
||||
return Ok(updatedUser);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the avatar URL for the current user.
|
||||
/// </summary>
|
||||
/// <param name="avatarUrl">The new avatar URL to set.</param>
|
||||
/// <returns>The updated user with the new avatar URL.</returns>
|
||||
[HttpPut("avatar")]
|
||||
public async Task<ActionResult<User>> UpdateAvatarUrl([FromBody] string avatarUrl)
|
||||
{
|
||||
var user = await GetUser();
|
||||
var updatedUser = await _userService.UpdateAvatarUrl(user, avatarUrl);
|
||||
return Ok(updatedUser);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user