fix: github_routes use access_token (not github_token)
user_oauth_tokens has generic access_token column, not github_token/gitea_token
This commit is contained in:
@@ -15,7 +15,7 @@ async def github_status(request: Request):
|
|||||||
return {"linked": False}
|
return {"linked": False}
|
||||||
with get_conn() as conn:
|
with get_conn() as conn:
|
||||||
row = conn.execute(
|
row = conn.execute(
|
||||||
"SELECT github_token FROM user_oauth_tokens WHERE user_id=? AND provider='github' AND github_token IS NOT NULL AND github_token != ''",
|
"SELECT access_token FROM user_oauth_tokens WHERE user_id=? AND provider='github' AND access_token IS NOT NULL AND access_token != ''",
|
||||||
(user["id"],)
|
(user["id"],)
|
||||||
).fetchone()
|
).fetchone()
|
||||||
return {"linked": row is not None}
|
return {"linked": row is not None}
|
||||||
|
|||||||
Reference in New Issue
Block a user