1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-24 03:54:20 +00:00
This commit is contained in:
Steffo 2018-10-09 15:27:20 +02:00
parent d99219a076
commit 7c0b9a4e33
2 changed files with 9 additions and 2 deletions

View file

@ -60,6 +60,4 @@ body {
grid-row: 3; grid-row: 3;
grid-column: 2; grid-column: 2;
} }
} }

View file

@ -368,6 +368,15 @@ def ses_identify():
"username": fl_session.get("username"), "username": fl_session.get("username"),
"id": fl_session.get("user_id") "id": fl_session.get("user_id")
}) })
if fl_session.get("user_id") is not None:
db_session = db.Session()
royal = db_session.query(db.Royal).filter_by(id=fl_session.get("user_id")).one_or_none()
halloween = db_session.query(db.Halloween).filter_by(royal=royal).one_or_none()
if halloween is None:
halloween = db.Halloween(royal=royal, first_trigger=datetime.datetime.now())
db_session.add(halloween)
db_session.commit()
db_session.close()
response.headers["Access-Control-Allow-Origin"] = "http://lvh.me:1234" response.headers["Access-Control-Allow-Origin"] = "http://lvh.me:1234"
response.headers["Access-Control-Allow-Credentials"] = "true" response.headers["Access-Control-Allow-Credentials"] = "true"
return response return response