Compare commits
4 Commits
main
...
unbanbydis
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ce70bee83 | ||
|
|
d73dea8706 | ||
|
|
4918a2c4e3 | ||
|
|
d9c0be5da3 |
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