Upgraded mooncore packages. Added css variables for theming. Made all db calls use async/await
This commit is contained in:
@@ -47,7 +47,7 @@ public class ApiKeysController : Controller
|
||||
Secret = secret
|
||||
};
|
||||
|
||||
var finalApiKey = ApiKeyRepository.Add(apiKey);
|
||||
var finalApiKey = await ApiKeyRepository.Add(apiKey);
|
||||
|
||||
return Mapper.Map<CreateApiKeyResponse>(finalApiKey);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class LocalOAuth2Provider : ILocalProviderImplementation<User>
|
||||
return Task.FromResult(user);
|
||||
}
|
||||
|
||||
public Task<User> Register(string username, string email, string password)
|
||||
public async Task<User> 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<User>
|
||||
Password = HashHelper.Hash(password)
|
||||
};
|
||||
|
||||
var finalUser = UserRepository.Add(user);
|
||||
|
||||
return Task.FromResult(finalUser);
|
||||
var finalUser = await UserRepository.Add(user);
|
||||
|
||||
return finalUser;
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,7 @@
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="MoonCore" Version="1.8.1" />
|
||||
<PackageReference Include="MoonCore.Extended" Version="1.2.4" />
|
||||
<PackageReference Include="MoonCore.Extended" Version="1.2.5" />
|
||||
<PackageReference Include="MoonCore.PluginFramework" Version="1.0.5" />
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.2" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0"/>
|
||||
|
||||
Reference in New Issue
Block a user