mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-19 06:54:19 +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 ApiKey { get; set; }
|
||||||
public string Label { get; set; }
|
public string Label { get; set; }
|
||||||
public string UserId { get; set; }
|
|
||||||
[JsonProperty(ItemConverterType = typeof(PermissionJsonConverter))]
|
[JsonProperty(ItemConverterType = typeof(PermissionJsonConverter))]
|
||||||
public Permission[] Permissions { get; set; }
|
public Permission[] Permissions { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,8 +47,7 @@ namespace BTCPayServer.Controllers.RestApi
|
|||||||
{
|
{
|
||||||
Permissions = Permission.ToPermissions(data.Permissions).ToArray(),
|
Permissions = Permission.ToPermissions(data.Permissions).ToArray(),
|
||||||
ApiKey = data.Id,
|
ApiKey = data.Id,
|
||||||
UserId = data.UserId,
|
Label = data.Label ?? string.Empty
|
||||||
Label = data.Label
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -335,15 +335,11 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"apiKey": {
|
"apiKey": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"nullable": true
|
"nullable": false
|
||||||
},
|
},
|
||||||
"label": {
|
"label": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"nullable": true
|
"nullable": false
|
||||||
},
|
|
||||||
"userId": {
|
|
||||||
"type": "string",
|
|
||||||
"nullable": true
|
|
||||||
},
|
},
|
||||||
"permissions": {
|
"permissions": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
|||||||
Reference in New Issue
Block a user