Unban work (#1)
Co-authored-by: defnotken <itsdefnotken@gmail.com> Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
5
LightlessSyncAPI/Dto/User/BanRequest.cs
Normal file
5
LightlessSyncAPI/Dto/User/BanRequest.cs
Normal file
@@ -0,0 +1,5 @@
|
||||
using MessagePack;
|
||||
namespace LightlessSync.API.Dto.User;
|
||||
|
||||
[MessagePackObject(keyAsPropertyName: true)]
|
||||
public record BanRequest(string Uid);
|
||||
9
LightlessSyncAPI/Dto/User/UnbanRequest.cs
Normal file
9
LightlessSyncAPI/Dto/User/UnbanRequest.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using MessagePack;
|
||||
|
||||
namespace LightlessSync.API.Dto.User;
|
||||
[MessagePackObject(keyAsPropertyName: true)]
|
||||
public record UnbanRequest(string? Uid, string? DiscordId)
|
||||
{
|
||||
public bool IsValid => !string.IsNullOrEmpty(Uid) || !string.IsNullOrEmpty(DiscordId);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,10 @@ public class LightlessAuth
|
||||
public const string OAuth_GetDiscordOAuthEndpoint = "getDiscordOAuthEndpoint";
|
||||
public const string OAuth_GetUIDs = "getUIDs";
|
||||
public const string OAuth_GetDiscordOAuthToken = "getDiscordOAuthToken";
|
||||
public const string User = "/user";
|
||||
public const string User_Unban_Discord = "unbanDiscord";
|
||||
public const string User_Unban_Uid = "unbanUID";
|
||||
public const string Ban_Uid = "ban";
|
||||
public static Uri AuthFullPath(Uri baseUri) => new Uri(baseUri, Auth + "/" + Auth_CreateIdent);
|
||||
public static Uri AuthWithOauthFullPath(Uri baseUri) => new Uri(baseUri, OAuth + "/" + OAuth_CreateOAuth);
|
||||
public static Uri RenewTokenFullPath(Uri baseUri) => new Uri(baseUri, Auth + "/" + Auth_RenewToken);
|
||||
|
||||
Reference in New Issue
Block a user