Can't add a note before there's a token

This commit is contained in:
Gervasio Marchand 2022-12-23 09:01:33 -03:00
parent 115a0f2a3f
commit d104c2ce93
No known key found for this signature in database
GPG Key ID: B7736CB188DD0A38

View File

@ -84,12 +84,14 @@ public static class ApiKeysHelper
public static async Task<string> AddTokenForHostAsync(string host, string? notes) public static async Task<string> AddTokenForHostAsync(string host, string? notes)
{ {
var token = await AddTokenForHostAsync(host, await GetTokenToHostAsync());
if (notes.HasValue()) if (notes.HasValue())
{ {
await UpdateNotesForHostAsync(host, notes); await UpdateNotesForHostAsync(host, notes);
} }
return await AddTokenForHostAsync(host, await GetTokenToHostAsync()); return token;
} }
public static async Task DeleteTokenForHostAsync(string host) public static async Task DeleteTokenForHostAsync(string host)
@ -125,4 +127,4 @@ public static class ApiKeysHelper
return key; return key;
} }
} }