update
This commit is contained in:
13
backend/api/profile_controller.py
Normal file
13
backend/api/profile_controller.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from fastapi import APIRouter, Depends
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from api.schemas import ProfileResponse
|
||||
from database.database import get_db
|
||||
from model.profile import Profile
|
||||
|
||||
router = APIRouter(prefix="/profiles", tags=["profiles"])
|
||||
|
||||
|
||||
@router.get("", response_model=list[ProfileResponse])
|
||||
def get_profiles(db: Session = Depends(get_db)):
|
||||
return Profile.get_all(db)
|
||||
Reference in New Issue
Block a user