seed admin role
All checks were successful
Build and Deploy API / build-and-deploy (push) Successful in 9s
All checks were successful
Build and Deploy API / build-and-deploy (push) Successful in 9s
This commit is contained in:
@@ -74,6 +74,10 @@ public class AuthController : ControllerBase {
|
|||||||
};
|
};
|
||||||
await jwt_.AddRefreshToken(newTokenObject);
|
await jwt_.AddRefreshToken(newTokenObject);
|
||||||
|
|
||||||
|
if(user.UserName == "bard") { // tempory because im silly
|
||||||
|
await userManager_.AddToRoleAsync(user, "superuser");
|
||||||
|
} // eventually ill have an endpoint for adding/removing roles
|
||||||
|
|
||||||
return Ok(new { accessToken, refreshToken });
|
return Ok(new { accessToken, refreshToken });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user