Adding Auth to Unbans

This commit is contained in:
defnotken
2025-09-05 11:24:33 -05:00
parent 4f249a2db9
commit 7c81f880e1
6 changed files with 740 additions and 1133 deletions

View File

@@ -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);