This commit is contained in:
@ -18,7 +18,6 @@ from clients import clients as c
|
|||||||
from clients.tmk import schema as ts
|
from clients.tmk import schema as ts
|
||||||
from clients.vitacore import schema as vs
|
from clients.vitacore import schema as vs
|
||||||
from shared import exceptions as e
|
from shared import exceptions as e
|
||||||
from shared.redis import cache_response
|
|
||||||
from shared.redis import client as cache
|
from shared.redis import client as cache
|
||||||
|
|
||||||
from . import schema as s
|
from . import schema as s
|
||||||
@ -38,7 +37,6 @@ router = APIRouter(
|
|||||||
status.HTTP_200_OK: {'model': vs.ProfileModel},
|
status.HTTP_200_OK: {'model': vs.ProfileModel},
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
@cache_response(ttl=600, namespace='main')
|
|
||||||
async def get_profile(user: Annotated[User, Depends(login)]):
|
async def get_profile(user: Annotated[User, Depends(login)]):
|
||||||
"""
|
"""
|
||||||
Get profile of user.
|
Get profile of user.
|
||||||
@ -52,7 +50,6 @@ async def get_profile(user: Annotated[User, Depends(login)]):
|
|||||||
status.HTTP_200_OK: {'model': vs.OrganizationsModel},
|
status.HTTP_200_OK: {'model': vs.OrganizationsModel},
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
@cache_response(ttl=3600, namespace='main')
|
|
||||||
async def get_departments():
|
async def get_departments():
|
||||||
"""
|
"""
|
||||||
Get list of departments.
|
Get list of departments.
|
||||||
@ -63,7 +60,6 @@ async def get_departments():
|
|||||||
@router.get(
|
@router.get(
|
||||||
'/getWorkers', responses={status.HTTP_200_OK: {'model': vs.WorkersModel}}
|
'/getWorkers', responses={status.HTTP_200_OK: {'model': vs.WorkersModel}}
|
||||||
)
|
)
|
||||||
@cache_response(ttl=3600, namespace='main')
|
|
||||||
async def get_workers(
|
async def get_workers(
|
||||||
user: Annotated[User, Depends(login)], departmentId: str
|
user: Annotated[User, Depends(login)], departmentId: str
|
||||||
):
|
):
|
||||||
@ -77,7 +73,6 @@ async def get_workers(
|
|||||||
'/getSpecs',
|
'/getSpecs',
|
||||||
responses={status.HTTP_200_OK: {'model': vs.SpecsV021Model}},
|
responses={status.HTTP_200_OK: {'model': vs.SpecsV021Model}},
|
||||||
)
|
)
|
||||||
@cache_response(ttl=3600, namespace='main')
|
|
||||||
async def get_specs(user: Annotated[User, Depends(login)]):
|
async def get_specs(user: Annotated[User, Depends(login)]):
|
||||||
"""
|
"""
|
||||||
Get list of specialties.
|
Get list of specialties.
|
||||||
|
|||||||
Reference in New Issue
Block a user