1
0
mirror of https://github.com/bitwarden/server synced 2025-12-20 02:03:46 +00:00

Initial cleanup

This commit is contained in:
Hinton
2025-10-16 15:17:44 -07:00
parent 58c620e8a0
commit b9dcac4423
4 changed files with 10 additions and 18 deletions

View File

@@ -4,6 +4,9 @@ public class SeededData
{
public Guid Id { get; set; }
public required string RecipeName { get; set; }
public required string Data { get; set; } // JSON blob with entity tracking info
/// <summary>
/// JSON blob containing all
/// </summary>
public required string Data { get; set; }
public DateTime CreationDate { get; set; }
}

View File

@@ -4,13 +4,8 @@ using Bit.SharedWeb.Utilities;
var builder = WebApplication.CreateBuilder(args);
// Generate a new MangleId for a request
builder.Services.AddScoped<MangleId>(_ => new MangleId());
// Add services to the container.
builder.Services.AddControllers();
// Configure GlobalSettings from appsettings
var globalSettings = builder.Services.AddGlobalSettingsServices(builder.Configuration, builder.Environment);
// Common services
@@ -24,6 +19,7 @@ builder.Services.AddScoped<Microsoft.AspNetCore.Identity.IPasswordHasher<Bit.Cor
builder.Services.AddSingleton<Bit.RustSDK.RustSdkService>();
builder.Services.AddScoped<Bit.Seeder.Factories.UserSeeder>();
builder.Services.AddScoped<IRecipeService, RecipeService>();
builder.Services.AddScoped<MangleId>(_ => new MangleId());
var app = builder.Build();
@@ -31,18 +27,10 @@ var app = builder.Build();
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Home/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseRouting();
app.MapControllerRoute(
name: "seed",
pattern: "{controller=Seed}/{action=Index}/{id?}");
app.MapControllerRoute(
name: "info",
pattern: "{controller=Info}/{action=Index}/{id?}");
app.MapControllerRoute(name: "default", pattern: "{controller=Seed}/{action=Index}/{id?}");
app.Run();

View File

@@ -13,5 +13,4 @@
<ProjectReference Include="..\Seeder\Seeder.csproj" />
</ItemGroup>
</Project>

View File

@@ -1,9 +1,11 @@
{
"globalSettings": {
"projectName": "SeederApi"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}
}