Spaces:
Runtime error
Runtime error
Download auth/controller/endpoints.py from nasr7322/Knights-Lab-Assessment: direct link, hf CLI and curl.
- Browser
- Download file 477 Bytes
-
https://huggingface.co/spaces/nasr7322/Knights-Lab-Assessment/resolve/main/auth/controller/endpoints.py
- Command line
-
hf download hf://spaces/nasr7322/Knights-Lab-Assessment/auth/controller/endpoints.py
-
curl -L -o endpoints.py https://huggingface.co/spaces/nasr7322/Knights-Lab-Assessment/resolve/main/auth/controller/endpoints.py
477 Bytes
| from fastapi import APIRouter, Depends | |
| from sqlalchemy.orm import Session | |
| from database import get_db | |
| from auth.service.auth_service import signup_user, login_user | |
| from auth.domain.user_domain import UserCreate, UserLogin | |
| router = APIRouter() | |
| def signup(user: UserCreate, db: Session = Depends(get_db)): | |
| return signup_user(user, db) | |
| def login(user: UserLogin, db: Session = Depends(get_db)): | |
| return login_user(user, db) |