fsd
This commit is contained in:
parent
80140722df
commit
c859843de7
1 changed files with 3 additions and 1 deletions
|
@ -7,7 +7,9 @@ def get_logged_in_user():
|
|||
token = request.headers.get("Authorization","").strip()
|
||||
|
||||
if token:
|
||||
client = g.db.query(ClientAuth).filter(ClientAuth.access_token == token).one_or_none()
|
||||
if g.db: client = g.db.query(ClientAuth).filter(ClientAuth.access_token == token).one_or_none()
|
||||
else: return None
|
||||
|
||||
if not client: return None
|
||||
|
||||
v = client.user
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue