fix: fixes to addQuote (don't require categories nor imageUrl)

also sends back role upon login
This commit is contained in:
2025-07-17 10:55:38 +02:00
parent 3cd2eff522
commit 2350935e8a
4 changed files with 6 additions and 5 deletions

View File

@@ -29,7 +29,8 @@ namespace QuotifyBE.Controllers
Name="admin",
Email = "admin@mail.com",
// hashed twice, once by frontend, and second time by backend
PasswordHash = guhf.HashWithSHA512(guhf.HashWithSHA512("admin"))
PasswordHash = guhf.HashWithSHA512(guhf.HashWithSHA512("admin")),
Role = 0 // role 0 - greatest power, admin, role 0 > role 1
};
_db.Users.Add(Admin);
await _db.SaveChangesAsync();