mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-29 05:55:21 -04:00
Invert if condition in authentication header
This commit is contained in:
parent
dd9da4831e
commit
0faa427970
1 changed files with 3 additions and 3 deletions
|
@ -33,9 +33,9 @@ namespace DiscordChatExporter.Core.Services
|
||||||
using (var request = new HttpRequestMessage(HttpMethod.Get, $"{apiRoot}/{resource}/{endpoint}"))
|
using (var request = new HttpRequestMessage(HttpMethod.Get, $"{apiRoot}/{resource}/{endpoint}"))
|
||||||
{
|
{
|
||||||
// Set authorization header
|
// Set authorization header
|
||||||
request.Headers.Authorization = token.Type == AuthTokenType.User
|
request.Headers.Authorization = token.Type == AuthTokenType.Bot
|
||||||
? new AuthenticationHeaderValue(token.Value)
|
? new AuthenticationHeaderValue("Bot", token.Value)
|
||||||
: new AuthenticationHeaderValue("Bot", token.Value);
|
: new AuthenticationHeaderValue(token.Value);
|
||||||
|
|
||||||
// Add parameters
|
// Add parameters
|
||||||
foreach (var parameter in parameters)
|
foreach (var parameter in parameters)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue