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,19 @@
|
||||
from typing import List
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
from src.db.models.admin import Token
|
||||
from src.db.session import SessionDep
|
||||
from src.schema.user.token import TokenResponse, to_response
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.get("/tokens", response_model=List[TokenResponse])
|
||||
def get_all_profiles(db: SessionDep) -> List[TokenResponse]:
|
||||
results: List[TokenResponse] = []
|
||||
tokens = db.query(Token).all()
|
||||
for token in tokens:
|
||||
response = to_response(token)
|
||||
results.append(response)
|
||||
return results
|
||||
Reference in New Issue
Block a user