mirror of
https://github.com/streetwriters/notesnook-sync-server.git
synced 2026-05-16 04:29:02 +02:00
inbox: improve http response status codes (#99)
* inbox: improve http response status codes * inbox api: respond with 401 unauthorized for invalid inbox api key * notesnook api (get public encryption key): respond with 404 if not found * Update Notesnook.Inbox.API/src/index.ts --------- Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
This commit is contained in:
@@ -133,7 +133,7 @@ namespace Notesnook.API.Controllers
|
||||
var userSetting = await userSettingsRepository.FindOneAsync(u => u.UserId == userId);
|
||||
if (string.IsNullOrWhiteSpace(userSetting?.InboxKeys?.Public))
|
||||
{
|
||||
return BadRequest(new { error = "Inbox public key is not configured." });
|
||||
return NotFound(new { error = "Inbox public key is not configured." });
|
||||
}
|
||||
return Ok(new { key = userSetting.InboxKeys.Public });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user