Adding Auth to Unbans
This commit is contained in:
@@ -152,6 +152,7 @@ public class LightlessModule : InteractionModuleBase
|
||||
try
|
||||
{
|
||||
using HttpClient c = new HttpClient();
|
||||
c.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", _serverTokenGenerator.Token);
|
||||
await c.PostAsJsonAsync(new Uri(_lightlessServicesConfiguration.GetValue<Uri>
|
||||
(nameof(ServicesConfiguration.MainServerAddress)), "/user/unbanDiscord"), new { discordId })
|
||||
.ConfigureAwait(false);
|
||||
@@ -192,6 +193,7 @@ public class LightlessModule : InteractionModuleBase
|
||||
try
|
||||
{
|
||||
using HttpClient c = new HttpClient();
|
||||
c.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", _serverTokenGenerator.Token);
|
||||
await c.PostAsJsonAsync(new Uri(_lightlessServicesConfiguration.GetValue<Uri>
|
||||
(nameof(ServicesConfiguration.MainServerAddress)), "/user/unbanUID"), new { uid })
|
||||
.ConfigureAwait(false);
|
||||
|
||||
Reference in New Issue
Block a user