service_man/api/presentation/routers/company.py

21 lines
543 B
Python
Raw Normal View History

2024-04-08 17:32:50 +03:00
from fastapi import APIRouter, Depends, Request
from api.application.contracts.company.company_response import \
CompanyBaseResponse
from api.presentation.auth.fasapi_auth import auth_required
company_router = APIRouter(prefix="/company", tags=["Company"])
@company_router.get(
"/",
response_model=None,
dependencies=[Depends(auth_required)],
)
async def get_company(request: Request) -> CompanyBaseResponse:
print(request.scope["auth"])
return CompanyBaseResponse(
name="some",
email="some",
)