Removed async as I suspect it was crashing the entire application.
This commit is contained in:
parent
a174f6b847
commit
d9d5754e26
@ -105,7 +105,7 @@ def show_list(user: UserToken = Depends(get_user)) -> List[schemas.Customer]:
|
||||
|
||||
|
||||
@router.get("/query", response_model=List[schemas.Customer])
|
||||
async def show_term(
|
||||
def show_term(
|
||||
q: str,
|
||||
current_user: UserToken = Depends(get_user),
|
||||
) -> List[schemas.Customer]:
|
||||
|
@ -33,7 +33,7 @@ router = APIRouter()
|
||||
|
||||
|
||||
@router.post("/token", response_model=Token)
|
||||
async def login_for_access_token(
|
||||
def login_for_access_token(
|
||||
response: Response,
|
||||
form_data: OAuth2PasswordRequestForm = Depends(),
|
||||
device_id: Optional[uuid.UUID] = Cookie(None),
|
||||
@ -81,7 +81,7 @@ async def login_for_access_token(
|
||||
|
||||
|
||||
@router.post("/refresh", response_model=Token)
|
||||
async def refresh_token(user: UserToken = Security(get_current_active_user)):
|
||||
def refresh_token(user: UserToken = Security(get_current_active_user)):
|
||||
access_token_expires = timedelta(minutes=settings.JWT_TOKEN_EXPIRE_MINUTES)
|
||||
access_token = create_access_token(
|
||||
data={
|
||||
|
@ -317,7 +317,7 @@ def product_list(date_: date, db: Session) -> List[schemas.Product]:
|
||||
|
||||
|
||||
@router.get("/query")
|
||||
async def show_term(
|
||||
def show_term(
|
||||
mc: Optional[uuid.UUID] = None,
|
||||
sc: Optional[uuid.UUID] = None,
|
||||
date_: date = Depends(effective_date),
|
||||
|
@ -134,7 +134,7 @@ def show_blank(
|
||||
|
||||
|
||||
@router.get("/list", response_model=List[schemas.UserList])
|
||||
async def show_list(
|
||||
def show_list(
|
||||
user: UserToken = Security(get_user, scopes=["users"]),
|
||||
) -> List[schemas.UserList]:
|
||||
with SessionFuture() as db:
|
||||
|
Loading…
Reference in New Issue
Block a user