forked from MarseyWorld/MarseyWorld
fix 500 error
parent
13143a72ab
commit
743ac90f08
|
@ -25,7 +25,7 @@ def send_verification_email(user, email=None):
|
|||
if not email:
|
||||
email = user.email
|
||||
|
||||
url = f"https://{SERVER_NAME}/activate"
|
||||
url = f"https://{SITE}/activate"
|
||||
now = int(time.time())
|
||||
|
||||
token = generate_hash(f"{email}+{user.id}+{now}")
|
||||
|
|
|
@ -26,7 +26,7 @@ def join_discord(v):
|
|||
|
||||
state=f"{now}.{state}"
|
||||
|
||||
return redirect(f"https://discord.com/api/oauth2/authorize?client_id={CLIENT_ID}&redirect_uri=https%3A%2F%2F{SERVER_NAME}%2Fdiscord_redirect&response_type=code&scope=identify%20guilds.join&state={state}")
|
||||
return redirect(f"https://discord.com/api/oauth2/authorize?client_id={CLIENT_ID}&redirect_uri=https%3A%2F%2F{SITE}%2Fdiscord_redirect&response_type=code&scope=identify%20guilds.join&state={state}")
|
||||
|
||||
|
||||
@app.get("/discord_redirect")
|
||||
|
@ -56,7 +56,7 @@ def discord_redirect(v):
|
|||
'client_secret': CLIENT_SECRET,
|
||||
'grant_type': 'authorization_code',
|
||||
'code': code,
|
||||
'redirect_uri': f"https://{SERVER_NAME}/discord_redirect",
|
||||
'redirect_uri': f"https://{SITE}/discord_redirect",
|
||||
'scope': 'identify guilds.join'
|
||||
}
|
||||
headers={
|
||||
|
|
|
@ -829,7 +829,7 @@ def submit_post(v, sub=None):
|
|||
except: pass
|
||||
embed += '"></lite-youtube>'
|
||||
|
||||
elif SERVER_NAME in domain and "/post/" in url and "context" not in url:
|
||||
elif SITE in domain and "/post/" in url and "context" not in url:
|
||||
id = url.split("/post/")[1]
|
||||
if "/" in id: id = id.split("/")[0]
|
||||
embed = str(int(id))
|
||||
|
|
Loading…
Reference in New Issue