Fix Task 5 review issues: per-test ApiFactory, drop dead RoleManager param + EF Core using
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user