Compare commits
2 Commits
81417b2a1c
...
d5ae7fedef
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5ae7fedef | ||
|
|
8d7cf86d4d |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -365,3 +365,4 @@ FodyWeavers.xsd
|
|||||||
# Setupfil för Aberwyn
|
# Setupfil för Aberwyn
|
||||||
infrastructure/setup.json
|
infrastructure/setup.json
|
||||||
Aberwyn/Infrastructure/setup.json
|
Aberwyn/Infrastructure/setup.json
|
||||||
|
/Aberwyn/Data/infrastructure/setup2.json
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ namespace Aberwyn.Controllers
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
_logger.LogDebug("Start setup write");
|
||||||
// Bygg connection string säkert
|
// Bygg connection string säkert
|
||||||
var baseConnBuilder = new MySqlConnectionStringBuilder
|
var baseConnBuilder = new MySqlConnectionStringBuilder
|
||||||
{
|
{
|
||||||
@@ -126,11 +127,10 @@ namespace Aberwyn.Controllers
|
|||||||
|
|
||||||
// Sätt konfig-flagga tidigt
|
// Sätt konfig-flagga tidigt
|
||||||
model.IsConfigured = true;
|
model.IsConfigured = true;
|
||||||
|
_logger.LogDebug("Filepath" + _filePath);
|
||||||
// Spara setup.json
|
// Spara setup.json
|
||||||
var json = JsonSerializer.Serialize(model, new JsonSerializerOptions { WriteIndented = true });
|
var json = JsonSerializer.Serialize(model, new JsonSerializerOptions { WriteIndented = true });
|
||||||
System.IO.File.WriteAllText(_filePath, json);
|
System.IO.File.WriteAllText(_filePath, json);
|
||||||
|
|
||||||
// Roller och admin
|
// Roller och admin
|
||||||
var userManager = scope.ServiceProvider.GetRequiredService<UserManager<ApplicationUser>>();
|
var userManager = scope.ServiceProvider.GetRequiredService<UserManager<ApplicationUser>>();
|
||||||
var roleManager = scope.ServiceProvider.GetRequiredService<RoleManager<IdentityRole>>();
|
var roleManager = scope.ServiceProvider.GetRequiredService<RoleManager<IdentityRole>>();
|
||||||
|
|||||||
Reference in New Issue
Block a user