api: fix error on user patch

This commit is contained in:
Abdullah Atta
2025-09-17 11:38:33 +05:00
parent 9b774d640c
commit 8f8c60e0b3
2 changed files with 12 additions and 18 deletions

View File

@@ -69,17 +69,11 @@ namespace Notesnook.API.Controllers
}
[HttpPatch]
public async Task<IActionResult> UpdateUser([FromBody] UserResponse user)
public async Task<IActionResult> UpdateUser([FromBody] UserKeys keys)
{
var userId = User.FindFirstValue("sub");
try
{
var keys = new UserKeys
{
AttachmentsKey = user.AttachmentsKey,
MonographPasswordsKey = user.MonographPasswordsKey,
InboxKeys = user.InboxKeys
};
await UserService.SetUserKeysAsync(userId, keys);
return Ok();
}