Testys commited on
Commit
7dfe74a
1 Parent(s): b4a98a2

Update users/routes.py

Browse files
Files changed (1) hide show
  1. users/routes.py +1 -2
users/routes.py CHANGED
@@ -13,7 +13,6 @@ from dotenv import load_dotenv
13
  from auth.services import get_token
14
 
15
 
16
- env_path = (os.path.abspath(os.path.join(os.path.dirname(__file__), '.env')))
17
  load_dotenv()
18
 
19
  router = APIRouter(
@@ -117,7 +116,7 @@ async def face_login(file: UploadFile = File(...), db: Session = Depends(get_db)
117
  if not user:
118
  raise HTTPException(status_code=404, detail="User not found")
119
 
120
- access_token_expires = timedelta(minutes=os.getenv("ACCESS_TOKEN_EXPIRE_MINUTES"))
121
  payload = {"id":user.id, "sub": user.email}
122
  token = get_token(payload, db)
123
  return JSONResponse(content=token.dict(), status_code=status.HTTP_200_OK)
 
13
  from auth.services import get_token
14
 
15
 
 
16
  load_dotenv()
17
 
18
  router = APIRouter(
 
116
  if not user:
117
  raise HTTPException(status_code=404, detail="User not found")
118
 
119
+ access_token_expires = timedelta(minutes=os.getenv("ACCESS_TOKEN"))
120
  payload = {"id":user.id, "sub": user.email}
121
  token = get_token(payload, db)
122
  return JSONResponse(content=token.dict(), status_code=status.HTTP_200_OK)