🐛 Fixed datetime bug and added sorting to quizzes on dashboard
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
import gzip
|
||||
import os
|
||||
from datetime import datetime
|
||||
|
||||
import ormar
|
||||
import pydantic
|
||||
@@ -63,7 +64,7 @@ router.include_router(oauth.router, tags=["users", "oauth"], prefix="/oauth")
|
||||
response_model_include={"id": ..., "verified": ..., "email": ...},
|
||||
)
|
||||
async def create_user(user: RouteUser, background_task: BackgroundTasks) -> User | JSONResponse:
|
||||
user = User(**user.dict(), id=uuid.uuid4(), avatar=gzipped_user_avatar())
|
||||
user = User(**user.dict(), id=uuid.uuid4(), avatar=gzipped_user_avatar(), created_at=datetime.now())
|
||||
try:
|
||||
validate_email(user.email)
|
||||
except EmailNotValidError as e:
|
||||
|
||||
Reference in New Issue
Block a user