diff --git a/src/FakeRelay.Core/Helpers/ApiKeysHelper.cs b/src/FakeRelay.Core/Helpers/ApiKeysHelper.cs index 7a12bf9..b6996ac 100644 --- a/src/FakeRelay.Core/Helpers/ApiKeysHelper.cs +++ b/src/FakeRelay.Core/Helpers/ApiKeysHelper.cs @@ -84,12 +84,14 @@ public static class ApiKeysHelper public static async Task AddTokenForHostAsync(string host, string? notes) { + var token = await AddTokenForHostAsync(host, await GetTokenToHostAsync()); + if (notes.HasValue()) { await UpdateNotesForHostAsync(host, notes); } - - return await AddTokenForHostAsync(host, await GetTokenToHostAsync()); + + return token; } public static async Task DeleteTokenForHostAsync(string host) @@ -125,4 +127,4 @@ public static class ApiKeysHelper return key; } -} \ No newline at end of file +}