mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-08-16 18:00:23 +03:00
chore: add types
This commit is contained in:
parent
dc98d3305e
commit
d362204cd8
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
@ -2,8 +2,9 @@
|
|||||||
"[python]": {
|
"[python]": {
|
||||||
"editor.defaultFormatter": "ms-python.autopep8"
|
"editor.defaultFormatter": "ms-python.autopep8"
|
||||||
},
|
},
|
||||||
"python.formatting.provider": "none",
|
"python.formatting.provider": "black",
|
||||||
"editor.codeActionsOnSave": {
|
"editor.codeActionsOnSave": {
|
||||||
"source.organizeImports": true
|
"source.organizeImports": true
|
||||||
}
|
},
|
||||||
|
"python.linting.enabled": true
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ class AuthBearer(HTTPBearer):
|
|||||||
elif not credentials:
|
elif not credentials:
|
||||||
raise HTTPException(status_code=403, detail="Invalid authorization code.")
|
raise HTTPException(status_code=403, detail="Invalid authorization code.")
|
||||||
|
|
||||||
async def authenticate(self, token, commons):
|
async def authenticate(self, token: str, commons: CommonsDep):
|
||||||
if os.environ.get("AUTHENTICATE") == "false":
|
if os.environ.get("AUTHENTICATE") == "false":
|
||||||
return self.get_test_user()
|
return self.get_test_user()
|
||||||
elif verify_token(token):
|
elif verify_token(token):
|
||||||
|
Loading…
Reference in New Issue
Block a user