global: minor refactoring

This commit is contained in:
Abdullah Atta
2024-03-05 10:07:01 +05:00
parent 4da9614851
commit 29eedd57e8
3 changed files with 5 additions and 3 deletions

View File

@@ -78,6 +78,8 @@ namespace Notesnook.API.Controllers
if (user.AttachmentsKey != null)
await UserService.SetUserAttachmentsKeyAsync(response.UserId, user.AttachmentsKey);
else if (user.Profile != null)
await UserService.SetUserProfileAsync(response.UserId, user.Profile);
else return BadRequest();
return Ok();
@@ -102,7 +104,7 @@ namespace Notesnook.API.Controllers
if (await UserService.DeleteUserAsync(userId, User.FindFirstValue("jti")))
{
Response response = await this.httpClient.ForwardAsync<Response>(this.HttpContextAccessor, $"{Servers.IdentityServer.ToString()}/account/unregister", HttpMethod.Post);
Response response = await this.httpClient.ForwardAsync<Response>(HttpContextAccessor, $"{Servers.IdentityServer}/account/unregister", HttpMethod.Post);
if (!response.Success) return BadRequest();
return Ok();