username change panel added

This commit is contained in:
2024-11-06 00:11:45 +01:00
Unverified
parent 26a5e1e558
commit 4cbc44f9be
21 changed files with 305 additions and 42 deletions

View File

@@ -92,6 +92,8 @@ public class AccountsController(IAccountsControllerService accountsControllerSer
#endregion
#region Info
[HttpGet("{id}/info")]
[AllowAnonymous]
[ProducesResponseType(typeof(AccountResponse), StatusCodes.Status200OK)]
@@ -105,6 +107,15 @@ public class AccountsController(IAccountsControllerService accountsControllerSer
[ProducesResponseType(StatusCodes.Status404NotFound)]
public async Task<ActionResult> PutAccountProfileInfo([FromBody]AccountProfileInfoRequest data) => await accountsControllerService.PutAccountProfileInfo(data);
[HttpPatch("username")]
[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status400BadRequest)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
public async Task<ActionResult> PatchAccountUsername([FromBody]AccountUsernameRequest data) => await accountsControllerService.PatchAccountUsername(data);
#endregion
[HttpGet("{id}/movies")]
[AllowAnonymous]
[ProducesResponseType(typeof(IEnumerable<MovieRatedResponse>), StatusCodes.Status200OK)]