Remove obsolete endpoints (#89)
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s
Remove endpoints api/login/token and api/login/profile --------- Co-authored-by: Thomas Peetz <thomas.peetz@cimt-ag.de> Reviewed-on: #89
This commit was merged in pull request #89.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
from typing import List
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
from src.db.models.admin import Assignment
|
||||
from src.db.session import SessionDep
|
||||
from src.schema.user.assignment import AssignmentResponse, to_response
|
||||
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.get("/assignments", response_model=List[AssignmentResponse])
|
||||
def get_all_profiles(db: SessionDep) -> List[AssignmentResponse]:
|
||||
results: List[AssignmentResponse] = []
|
||||
profiles = db.query(Assignment).all()
|
||||
for profile in profiles:
|
||||
response = to_response(profile)
|
||||
results.append(response)
|
||||
return results
|
||||
Reference in New Issue
Block a user