Make sure ApiKeyData set all the fields, remove UserId

This commit is contained in:
nicolas.dorier
2020-03-20 20:00:05 +09:00
parent ad4dbdad6d
commit d2864ccd7c
3 changed files with 3 additions and 9 deletions

View File

@@ -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; }
}

View File

@@ -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
};
}
}

View File

@@ -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",