mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 22:44:29 +01:00
Make sure ApiKeyData set all the fields, remove UserId
This commit is contained in:
@@ -7,7 +7,6 @@ namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public string ApiKey { get; set; }
|
||||
public string Label { get; set; }
|
||||
public string UserId { get; set; }
|
||||
[JsonProperty(ItemConverterType = typeof(PermissionJsonConverter))]
|
||||
public Permission[] Permissions { get; set; }
|
||||
}
|
||||
|
||||
@@ -47,8 +47,7 @@ namespace BTCPayServer.Controllers.RestApi
|
||||
{
|
||||
Permissions = Permission.ToPermissions(data.Permissions).ToArray(),
|
||||
ApiKey = data.Id,
|
||||
UserId = data.UserId,
|
||||
Label = data.Label
|
||||
Label = data.Label ?? string.Empty
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -335,15 +335,11 @@
|
||||
"properties": {
|
||||
"apiKey": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
"nullable": false
|
||||
},
|
||||
"label": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"userId": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
"nullable": false
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
||||
Reference in New Issue
Block a user