From 39b9e55efb7fe38061faa3fb004260532a9ea9b4 Mon Sep 17 00:00:00 2001 From: Loporrit <141286461+loporrit@users.noreply.github.com> Date: Fri, 1 Sep 2023 15:02:24 +0000 Subject: [PATCH] Add /auth/registerNewKey --- MareSynchronosAPI/Dto/Account/RegisterReplyDto.cs | 12 ++++++++++++ MareSynchronosAPI/Routes/MareAuth.cs | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 MareSynchronosAPI/Dto/Account/RegisterReplyDto.cs diff --git a/MareSynchronosAPI/Dto/Account/RegisterReplyDto.cs b/MareSynchronosAPI/Dto/Account/RegisterReplyDto.cs new file mode 100644 index 0000000..ce3f741 --- /dev/null +++ b/MareSynchronosAPI/Dto/Account/RegisterReplyDto.cs @@ -0,0 +1,12 @@ +using MessagePack; + +namespace MareSynchronos.API.Dto.Account; + +[MessagePackObject(keyAsPropertyName: true)] +public record RegisterReplyDto +{ + public bool Success { get; set; } = false; + public string ErrorMessage { get; set; } = string.Empty; + public string UID { get; set; } = string.Empty; + public string SecretKey { get; set; } = string.Empty; +} \ No newline at end of file diff --git a/MareSynchronosAPI/Routes/MareAuth.cs b/MareSynchronosAPI/Routes/MareAuth.cs index 291e5d3..85adb56 100644 --- a/MareSynchronosAPI/Routes/MareAuth.cs +++ b/MareSynchronosAPI/Routes/MareAuth.cs @@ -5,5 +5,7 @@ public class MareAuth public const string Auth = "/auth"; public const string Auth_CreateIdent = "createWithIdent"; + public const string Auth_Register = "registerNewKey"; public static Uri AuthFullPath(Uri baseUri) => new Uri(baseUri, Auth + "/" + Auth_CreateIdent); + public static Uri AuthRegisterFullPath(Uri baseUri) => new Uri(baseUri, Auth + "/" + Auth_Register); } \ No newline at end of file