Update app.py
This commit is contained in:
parent
52e0a53c91
commit
fa580bcc58
6
app.py
6
app.py
@ -1924,13 +1924,12 @@ def register():
|
|||||||
INSERT OR IGNORE INTO user_profiles (
|
INSERT OR IGNORE INTO user_profiles (
|
||||||
user_id,
|
user_id,
|
||||||
display_name,
|
display_name,
|
||||||
badge_text,
|
|
||||||
bio,
|
bio,
|
||||||
bio_mode,
|
bio_mode,
|
||||||
website,
|
website,
|
||||||
location,
|
location,
|
||||||
updated_at
|
updated_at
|
||||||
) VALUES (?, ?, '', '', 'txt', '', '', ?)
|
) VALUES (?, ?, '', 'txt', '', '', ?)
|
||||||
""",
|
""",
|
||||||
(user["id"], username, now_iso()),
|
(user["id"], username, now_iso()),
|
||||||
)
|
)
|
||||||
@ -1962,6 +1961,7 @@ def register():
|
|||||||
|
|
||||||
@app.route("/api/login", methods=["POST"])
|
@app.route("/api/login", methods=["POST"])
|
||||||
def login():
|
def login():
|
||||||
|
|
||||||
limited = rate_limited("login")
|
limited = rate_limited("login")
|
||||||
if limited:
|
if limited:
|
||||||
return limited
|
return limited
|
||||||
@ -2014,7 +2014,7 @@ def login():
|
|||||||
"csrf_token": csrf_token(),
|
"csrf_token": csrf_token(),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@app.route("/api/logout", methods=["POST"])
|
@app.route("/api/logout", methods=["POST"])
|
||||||
def logout():
|
def logout():
|
||||||
if not csrf_valid():
|
if not csrf_valid():
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user