diff --git a/backend/src/Program.cs b/backend/src/Program.cs index d8730e2..9cc59fa 100644 --- a/backend/src/Program.cs +++ b/backend/src/Program.cs @@ -40,6 +40,18 @@ using (var scope = app.Services.CreateScope()) { var dbContext = scope.ServiceProvider.GetRequiredService(); dbContext.Database.Migrate(); + + if (dbContext.Logins.FirstOrDefault(l => l.Username == "Admin") == null) + { + dbContext.Logins.Add(new JellyGlass.Models.UserLogin() + { + Username = "Admin", + HashedPassword = "$2a$12$NM6PozGL.auxReuOC/xUve9NMIP.Uork1jljb6/0.VZAs1GkvY1xC", + IsAdmin = true + }); + } + + dbContext.SaveChanges(); } // Configure the HTTP request pipeline.