feat: improve user admin (#2777)

This commit is contained in:
Vlad Stan
2024-11-19 10:33:57 +02:00
committed by GitHub
parent 8c5c455f1c
commit af568d0f31
22 changed files with 1167 additions and 655 deletions
+2 -2
View File
@@ -35,9 +35,9 @@ from ..crud import (
from ..models import (
AccessTokenPayload,
Account,
CreateUser,
LoginUsernamePassword,
LoginUsr,
RegisterUser,
ResetUserPassword,
UpdateSuperuserPassword,
UpdateUser,
@@ -145,7 +145,7 @@ async def logout() -> JSONResponse:
@auth_router.post("/register")
async def register(data: CreateUser) -> JSONResponse:
async def register(data: RegisterUser) -> JSONResponse:
if not settings.is_auth_method_allowed(AuthMethods.username_and_password):
raise HTTPException(
HTTPStatus.UNAUTHORIZED,