Fix set-avatar auth flow and API avatar upload stability
All checks were successful
Dotnet build and test / build (pull_request) Successful in 8m5s

This commit is contained in:
Paul Schneider 2026-09-04 19:03:08 +01:00
commit b820348558
Signed by: notazof
GPG key ID: 1DD5D838E5343B06
10 changed files with 115 additions and 117 deletions

View file

@ -10,7 +10,7 @@ using System.Diagnostics;
namespace Yavsc.WebApi.Controllers
{
[Route("~/api/account")]
[Route( Constants.APIPrefix + "/account")]
[Authorize("ApiScope")]
public class ApiAccountController : Controller
{
@ -61,12 +61,12 @@ namespace Yavsc.WebApi.Controllers
return Ok(new { host = Request.ForwardedFor() });
}
/// <summary>
/// Updates the avatar
/// </summary>
/// <returns></returns>
[HttpPost("~/api/set-avatar")]
[HttpPost("set-avatar")]
public async Task<IActionResult> SetAvatar()
{
var user = await GetUserData(User.GetUserId());