api: add user's monograph passwords key (#41)

This commit is contained in:
01zulfi
2025-08-18 11:45:42 +05:00
committed by GitHub
parent 8df70c81fc
commit 6d6342dbff
6 changed files with 52 additions and 7 deletions

View File

@@ -74,8 +74,12 @@ namespace Notesnook.API.Controllers
var userId = User.FindFirstValue("sub");
try
{
if (user.AttachmentsKey != null)
await UserService.SetUserAttachmentsKeyAsync(userId, user.AttachmentsKey);
var keys = new UserKeys
{
AttachmentsKey = user.AttachmentsKey,
MonographPasswordsKey = user.MonographPasswordsKey
};
await UserService.SetUserKeysAsync(userId, keys);
return Ok();
}
catch (Exception ex)