From 6f3f08ed340e59a62a2d0428a5c32f99551ef1ce Mon Sep 17 00:00:00 2001 From: Rory& Date: Tue, 3 Jun 2025 01:01:40 +0200 Subject: Fix performance issues, add fake user bot to test client, more testing --- testFrontend/SafeNSound.Sdk/SafeNSoundAuthentication.cs | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'testFrontend/SafeNSound.Sdk/SafeNSoundAuthentication.cs') diff --git a/testFrontend/SafeNSound.Sdk/SafeNSoundAuthentication.cs b/testFrontend/SafeNSound.Sdk/SafeNSoundAuthentication.cs index 333db6d..d0ed245 100644 --- a/testFrontend/SafeNSound.Sdk/SafeNSoundAuthentication.cs +++ b/testFrontend/SafeNSound.Sdk/SafeNSoundAuthentication.cs @@ -13,13 +13,13 @@ public class SafeNSoundAuthentication(SafeNSoundConfiguration config) { res.EnsureSuccessStatusCode(); } - public async Task Login(AuthDto authDto) { + public async Task Login(AuthDto authDto) { var hc = new WrappedHttpClient() { BaseAddress = new Uri(config.BaseUri) }; var res = await hc.PostAsJsonAsync("/auth/login", authDto); - return (await res.Content.ReadFromJsonAsync())!; + return (await res.Content.ReadFromJsonAsync())!; } public async Task Delete(AuthDto authDto) { @@ -32,16 +32,7 @@ public class SafeNSoundAuthentication(SafeNSoundConfiguration config) { } } -public class RegisterDto { - [JsonPropertyName("username")] - public string Username { get; set; } = string.Empty; - - [JsonPropertyName("password")] - public string Password { get; set; } = string.Empty; - - [JsonPropertyName("email")] - public string Email { get; set; } = string.Empty; - +public class RegisterDto : AuthDto { [JsonPropertyName("type")] public string UserType { get; set; } = string.Empty; } @@ -68,7 +59,7 @@ public class WhoAmI { public required string UserType { get; set; } } -public class SafeNSoundAuthResult : WhoAmI { +public class AuthResult : WhoAmI { [JsonPropertyName("accessToken")] public required string AccessToken { get; set; } } \ No newline at end of file -- cgit 1.5.1