From 0faa4279703fddf47c48d25b6ded07d562f33277 Mon Sep 17 00:00:00 2001 From: Alexey Golub Date: Fri, 3 Aug 2018 00:13:44 +0300 Subject: [PATCH] Invert if condition in authentication header --- DiscordChatExporter.Core/Services/DataService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DiscordChatExporter.Core/Services/DataService.cs b/DiscordChatExporter.Core/Services/DataService.cs index 215aaf2..3a863d5 100644 --- a/DiscordChatExporter.Core/Services/DataService.cs +++ b/DiscordChatExporter.Core/Services/DataService.cs @@ -33,9 +33,9 @@ namespace DiscordChatExporter.Core.Services using (var request = new HttpRequestMessage(HttpMethod.Get, $"{apiRoot}/{resource}/{endpoint}")) { // Set authorization header - request.Headers.Authorization = token.Type == AuthTokenType.User - ? new AuthenticationHeaderValue(token.Value) - : new AuthenticationHeaderValue("Bot", token.Value); + request.Headers.Authorization = token.Type == AuthTokenType.Bot + ? new AuthenticationHeaderValue("Bot", token.Value) + : new AuthenticationHeaderValue(token.Value); // Add parameters foreach (var parameter in parameters)