Testys commited on
Commit
d8be4a2
1 Parent(s): 1ffaaac

Update auth/route.py

Browse files
Files changed (1) hide show
  1. auth/route.py +2 -2
auth/route.py CHANGED
@@ -10,11 +10,11 @@ router = APIRouter(
10
  responses={404: {"description": "Not found"}},
11
  )
12
 
13
- @router.get("/token", status_code=status.HTTP_200_OK)
14
  async def authenticate_user(data: OAuth2PasswordRequestForm = Depends(), db: Session = Depends(get_db)):
15
  return await get_token(data, db)
16
 
17
 
18
  @router.post("/refresh", status_code=status.HTTP_200_OK)
19
- async def refresh_token(refresh_token: str , db: Session = Depends(get_db)):
20
  return await get_refresh_token(token=refresh_token, db=db)
 
10
  responses={404: {"description": "Not found"}},
11
  )
12
 
13
+ @router.post("/token", status_code=status.HTTP_200_OK)
14
  async def authenticate_user(data: OAuth2PasswordRequestForm = Depends(), db: Session = Depends(get_db)):
15
  return await get_token(data, db)
16
 
17
 
18
  @router.post("/refresh", status_code=status.HTTP_200_OK)
19
+ async def refresh_token(refresh_token: str = Header(...), db: Session = Depends(get_db)):
20
  return await get_refresh_token(token=refresh_token, db=db)