Add webhook

This commit is contained in:
2025-06-09 01:04:02 +07:00
parent 8836c45c9d
commit 1f2780d52a
15 changed files with 195 additions and 19 deletions

View File

@@ -87,5 +87,18 @@ public class UserController : BaseController
var updatedUser = await _userService.UpdateAvatarUrl(user, avatarUrl);
return Ok(updatedUser);
}
/// <summary>
/// Updates the Telegram channel for the current user.
/// </summary>
/// <param name="telegramChannel">The new Telegram channel to set.</param>
/// <returns>The updated user with the new Telegram channel.</returns>
[HttpPut("telegram-channel")]
public async Task<ActionResult<User>> UpdateTelegramChannel([FromBody] string telegramChannel)
{
var user = await GetUser();
var updatedUser = await _userService.UpdateTelegramChannel(user, telegramChannel);
return Ok(updatedUser);
}
}