From d73dea87061ea296fc4554815fc1531539b94377 Mon Sep 17 00:00:00 2001 From: defnotken Date: Fri, 5 Sep 2025 16:32:33 -0500 Subject: [PATCH] Add new DTOs --- LightlessSyncAPI/Dto/User/BanRequest.cs | 5 +++++ LightlessSyncAPI/Dto/User/UnbanRequest.cs | 9 +++++++++ 2 files changed, 14 insertions(+) create mode 100644 LightlessSyncAPI/Dto/User/BanRequest.cs create mode 100644 LightlessSyncAPI/Dto/User/UnbanRequest.cs diff --git a/LightlessSyncAPI/Dto/User/BanRequest.cs b/LightlessSyncAPI/Dto/User/BanRequest.cs new file mode 100644 index 0000000..fd727f6 --- /dev/null +++ b/LightlessSyncAPI/Dto/User/BanRequest.cs @@ -0,0 +1,5 @@ +using MessagePack; +namespace LightlessSync.API.Dto.User; + +[MessagePackObject(keyAsPropertyName: true)] +public record BanRequest(string UID); diff --git a/LightlessSyncAPI/Dto/User/UnbanRequest.cs b/LightlessSyncAPI/Dto/User/UnbanRequest.cs new file mode 100644 index 0000000..719ee2d --- /dev/null +++ b/LightlessSyncAPI/Dto/User/UnbanRequest.cs @@ -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); +} +