mirror of
https://github.com/bitwarden/server
synced 2025-12-24 20:23:21 +00:00
Resolve some comments
This commit is contained in:
@@ -31,7 +31,7 @@ public class SceneService(
|
||||
|
||||
public async Task<SceneResponseModel> ExecuteScene(string templateName, JsonElement? arguments)
|
||||
{
|
||||
var result = await ExecuteSceneMethod(templateName, arguments, "Seed");
|
||||
var result = await ExecuteSceneMethodAsync(templateName, arguments, "Seed");
|
||||
|
||||
return SceneResponseModel.FromSceneResult(result);
|
||||
}
|
||||
@@ -108,7 +108,7 @@ public class SceneService(
|
||||
}
|
||||
}
|
||||
|
||||
private async Task<SceneResult<object?>> ExecuteSceneMethod(string templateName, JsonElement? arguments, string methodName)
|
||||
private async Task<SceneResult<object?>> ExecuteSceneMethodAsync(string templateName, JsonElement? arguments, string methodName)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -24,26 +24,19 @@ public class Startup
|
||||
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
// Options
|
||||
services.AddOptions();
|
||||
|
||||
// Settings
|
||||
var globalSettings = services.AddGlobalSettingsServices(Configuration, Environment);
|
||||
|
||||
// Data Protection
|
||||
services.AddCustomDataProtectionServices(Environment, globalSettings);
|
||||
|
||||
// Repositories
|
||||
services.AddTokenizers();
|
||||
services.AddDatabaseRepositories(globalSettings);
|
||||
|
||||
// Context
|
||||
services.TryAddSingleton<IHttpContextAccessor, HttpContextAccessor>();
|
||||
|
||||
// Identity
|
||||
services.AddScoped<IPasswordHasher<Core.Entities.User>, PasswordHasher<Core.Entities.User>>();
|
||||
|
||||
// Seeder services
|
||||
services.AddSingleton<RustSDK.RustSdkService>();
|
||||
services.AddScoped<UserSeeder>();
|
||||
services.AddScoped<ISceneService, SceneService>();
|
||||
@@ -52,7 +45,6 @@ public class Startup
|
||||
services.AddScenes();
|
||||
services.AddQueries();
|
||||
|
||||
// MVC
|
||||
services.AddControllers();
|
||||
}
|
||||
|
||||
@@ -62,13 +54,11 @@ public class Startup
|
||||
IHostApplicationLifetime appLifetime,
|
||||
GlobalSettings globalSettings)
|
||||
{
|
||||
// Add PlayIdMiddleware services
|
||||
if (globalSettings.TestPlayIdTrackingEnabled)
|
||||
{
|
||||
app.UseMiddleware<PlayIdMiddleware>();
|
||||
}
|
||||
|
||||
// Configure the HTTP request pipeline
|
||||
if (!env.IsDevelopment())
|
||||
{
|
||||
app.UseExceptionHandler("/Home/Error");
|
||||
|
||||
Reference in New Issue
Block a user