support init database
This commit is contained in:
1 parent
1e3e39284a
commit
ac331dc9c9
16 files changed
+517
-4
No files matched your search
Binary file not shown.
+2
-2
@@ -1,4 +1,4 @@
|
||||
import jwt
|
||||
from jose import jwt
|
||||
|
||||
from sqlalchemy.orm import Session
|
||||
from fastapi import Depends, HTTPException, status
|
||||
@@ -25,7 +25,7 @@ def get_current_user(
|
||||
try:
|
||||
payload = decode_token(token)
|
||||
print(payload)
|
||||
except jwt.JWTError:
|
||||
except Exception as e:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_403_FORBIDDEN,
|
||||
detail="Could not validate credentials",
|
||||
|
||||
Reference in new issue
Block a user