diff --git a/Moonlight.ApiServer/Http/Controllers/Admin/ApiKeys/ApiKeysController.cs b/Moonlight.ApiServer/Http/Controllers/Admin/ApiKeys/ApiKeysController.cs index ead47432..7994b2c2 100644 --- a/Moonlight.ApiServer/Http/Controllers/Admin/ApiKeys/ApiKeysController.cs +++ b/Moonlight.ApiServer/Http/Controllers/Admin/ApiKeys/ApiKeysController.cs @@ -47,7 +47,7 @@ public class ApiKeysController : Controller Secret = secret }; - var finalApiKey = ApiKeyRepository.Add(apiKey); + var finalApiKey = await ApiKeyRepository.Add(apiKey); return Mapper.Map(finalApiKey); } diff --git a/Moonlight.ApiServer/Implementations/OAuth2/LocalOAuth2Provider.cs b/Moonlight.ApiServer/Implementations/OAuth2/LocalOAuth2Provider.cs index d1c82cc0..d4c43d92 100644 --- a/Moonlight.ApiServer/Implementations/OAuth2/LocalOAuth2Provider.cs +++ b/Moonlight.ApiServer/Implementations/OAuth2/LocalOAuth2Provider.cs @@ -41,7 +41,7 @@ public class LocalOAuth2Provider : ILocalProviderImplementation return Task.FromResult(user); } - public Task Register(string username, string email, string password) + public async Task Register(string username, string email, string password) { if (UserRepository.Get().Any(x => x.Username == username)) throw new HttpApiException("A user with that username already exists", 400); @@ -56,8 +56,8 @@ public class LocalOAuth2Provider : ILocalProviderImplementation Password = HashHelper.Hash(password) }; - var finalUser = UserRepository.Add(user); - - return Task.FromResult(finalUser); + var finalUser = await UserRepository.Add(user); + + return finalUser; } } \ No newline at end of file diff --git a/Moonlight.ApiServer/Moonlight.ApiServer.csproj b/Moonlight.ApiServer/Moonlight.ApiServer.csproj index e5920de0..a50dfe2d 100644 --- a/Moonlight.ApiServer/Moonlight.ApiServer.csproj +++ b/Moonlight.ApiServer/Moonlight.ApiServer.csproj @@ -25,7 +25,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Moonlight.Client/Moonlight.Client.csproj b/Moonlight.Client/Moonlight.Client.csproj index 30538555..3e5e257b 100644 --- a/Moonlight.Client/Moonlight.Client.csproj +++ b/Moonlight.Client/Moonlight.Client.csproj @@ -27,7 +27,7 @@ - +