mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-12 17:11:20 +01:00
Dont convert to string when serializing
This commit is contained in:
parent
af00b66687
commit
0af45c5dca
@ -23,7 +23,7 @@ def after_request(response):
|
||||
if response.is_json:
|
||||
session_copy = copy.deepcopy(dict(session))
|
||||
data = response.get_json()
|
||||
data["session"] = serializer.dumps(json.dumps(session_copy))
|
||||
data["session"] = serializer.dumps(session_copy)
|
||||
response.set_data(json.dumps(data))
|
||||
return response
|
||||
|
||||
@ -32,7 +32,7 @@ def before_request():
|
||||
authorization = request.headers.get("authorization", None)
|
||||
if authorization:
|
||||
try:
|
||||
data = json.loads(serializer.loads(authorization))
|
||||
data = serializer.loads(authorization)
|
||||
session.update(data)
|
||||
except:
|
||||
pass
|
||||
|
@ -107,7 +107,7 @@ def guild_embed(guild_id):
|
||||
def signin_complete():
|
||||
sess = ""
|
||||
session_copy = copy.deepcopy(dict(session))
|
||||
sess = serializer.dumps(json.dumps(session_copy))
|
||||
sess = serializer.dumps(session_copy)
|
||||
return render_template("signin_complete.html.j2", session=sess)
|
||||
|
||||
@embed.route("/login_discord")
|
||||
|
@ -20,7 +20,7 @@ class Gateway(Namespace):
|
||||
authorization = data.get("session", None)
|
||||
if authorization:
|
||||
try:
|
||||
data = json.loads(serializer.loads(authorization))
|
||||
data = serializer.loads(authorization)
|
||||
session.update(data)
|
||||
except:
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user