listusers thing
This commit is contained in:
parent
37dfef84f5
commit
86492f6bea
15
main
15
main
|
@ -307,6 +307,21 @@ def apiremovenote():
|
||||||
else:
|
else:
|
||||||
return {}, 422
|
return {}, 422
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/listusers/<secretkey>", methods=("GET", "POST"))
|
||||||
|
def listusers(secretkey):
|
||||||
|
if secretkey == SECRET_KEY:
|
||||||
|
conn = get_db_connection()
|
||||||
|
users = conn.execute("SELECT * FROM users").fetchall()
|
||||||
|
conn.close()
|
||||||
|
thing = ""
|
||||||
|
for x in users:
|
||||||
|
thing = str(x["id"]) + " - " + x["username"] + " - " + str(get_space(x["id"])) + "<br>" + thing
|
||||||
|
|
||||||
|
return thing
|
||||||
|
else:
|
||||||
|
return redirect("/")
|
||||||
|
|
||||||
@app.route("/api/logout")
|
@app.route("/api/logout")
|
||||||
def apilogout():
|
def apilogout():
|
||||||
return render_template("logout.html")
|
return render_template("logout.html")
|
||||||
|
|
Loading…
Reference in New Issue