Oauth Anthentication #48

Merged
Xefir merged 13 commits from v2 into master 2022-09-12 18:47:37 +00:00
1 changed files with 1 additions and 1 deletions
Showing only changes of commit 966510c467 - Show all commits

View File

@ -209,7 +209,7 @@ async def subscribe(guild_id: str):
discord = make_session(token=session.get("oauth2_token"))
user_guilds = discord.get(f"{API_BASE_URL}/users/@me/guilds").json()
if not any(guild_id == user_guild.id for user_guild in user_guilds):
if not any(str(guild.id) == user_guild["id"] for user_guild in user_guilds):
return redirect(url_for(".login"))
user = discord.get(f"{API_BASE_URL}/users/@me").json()