Skip to content

Commit b5b2763

Browse files
committed
Minor refactor
1 parent f7e2846 commit b5b2763

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

dropbox-sdk-dotnet/Examples/SimpleTest/Program.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,11 @@ private async Task<string> GetAccessToken()
219219
}
220220
Console.WriteLine();
221221

222-
string apiKey = GetApiKey();
223-
224222
string accessToken = Settings.Default.AccessToken;
225223

226-
if (string.IsNullOrEmpty(accessToken) && !string.IsNullOrWhiteSpace(apiKey))
224+
if (string.IsNullOrEmpty(accessToken))
227225
{
226+
string apiKey = GetApiKey();
228227
using var http = new HttpListener();
229228
try
230229
{

0 commit comments

Comments
 (0)