mirror of
https://github.com/streetwriters/notesnook-sync-server.git
synced 2026-08-13 20:10:18 +02:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
33413b0a5c |
@@ -63,7 +63,7 @@ namespace Notesnook.API.Controllers
|
|||||||
|
|
||||||
[HttpPost("api-keys")]
|
[HttpPost("api-keys")]
|
||||||
[Authorize(Policy = "Notesnook")]
|
[Authorize(Policy = "Notesnook")]
|
||||||
public async Task<IActionResult> CreateApiKeyAsync([FromBody] InboxApiKey request)
|
public async Task<IActionResult> CreateApiKeyAsync([FromBody] CreateInboxApiKeyRequest request)
|
||||||
{
|
{
|
||||||
var userId = User.GetUserId();
|
var userId = User.GetUserId();
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -24,6 +24,15 @@ using NanoidDotNet;
|
|||||||
|
|
||||||
namespace Notesnook.API.Models
|
namespace Notesnook.API.Models
|
||||||
{
|
{
|
||||||
|
public class CreateInboxApiKeyRequest
|
||||||
|
{
|
||||||
|
[JsonPropertyName("name")]
|
||||||
|
public required string Name { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("expiryDate")]
|
||||||
|
public long ExpiryDate { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class InboxApiKey
|
public class InboxApiKey
|
||||||
{
|
{
|
||||||
public InboxApiKey()
|
public InboxApiKey()
|
||||||
|
|||||||
Reference in New Issue
Block a user