Fix Task 5 review issues: per-test ApiFactory, drop dead RoleManager param + EF Core using

This commit is contained in:
2026-06-11 18:38:37 +00:00
parent 2a208e81b2
commit a1aa5023a2
2 changed files with 10 additions and 11 deletions
+1 -3
View File
@@ -1,6 +1,5 @@
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace backend.Auth;
@@ -15,8 +14,7 @@ public static class AuthEndpoints
grp.MapPost("/register", async (
[FromBody] RegisterRequest req,
UserManager<ApplicationUser> users,
RoleManager<IdentityRole<Guid>> roles) =>
UserManager<ApplicationUser> users) =>
{
var user = new ApplicationUser { UserName = req.Email, Email = req.Email };
var create = await users.CreateAsync(user, req.Password);