notify: remove a lot of leaky print statements
This commit is contained in:
parent
2df7038142
commit
b067fb5df2
1 changed files with 0 additions and 7 deletions
|
@ -93,7 +93,6 @@ def index():
|
||||||
# handle post stuff
|
# handle post stuff
|
||||||
if request.method == "POST":
|
if request.method == "POST":
|
||||||
action = request.form.get("action", "").lower()
|
action = request.form.get("action", "").lower()
|
||||||
print("Action", action)
|
|
||||||
if "token" in action:
|
if "token" in action:
|
||||||
generate_token_for_user(username)
|
generate_token_for_user(username)
|
||||||
elif "room id" in action:
|
elif "room id" in action:
|
||||||
|
@ -179,7 +178,6 @@ def send_notification():
|
||||||
body = request.args.get("body", request.get_data().decode("utf-8"))
|
body = request.args.get("body", request.get_data().decode("utf-8"))
|
||||||
if not body:
|
if not body:
|
||||||
body = " "
|
body = " "
|
||||||
print("BODY", body)
|
|
||||||
token = request.authorization.token or request.authorization.password
|
token = request.authorization.token or request.authorization.password
|
||||||
if not token:
|
if not token:
|
||||||
return (
|
return (
|
||||||
|
@ -199,7 +197,6 @@ def send_notification():
|
||||||
|
|
||||||
con = get_db()
|
con = get_db()
|
||||||
cur = con.cursor()
|
cur = con.cursor()
|
||||||
print(token)
|
|
||||||
res = cur.execute(
|
res = cur.execute(
|
||||||
"SELECT username FROM tokens WHERE token = ?", (token,)
|
"SELECT username FROM tokens WHERE token = ?", (token,)
|
||||||
).fetchone()
|
).fetchone()
|
||||||
|
@ -212,8 +209,6 @@ def send_notification():
|
||||||
if ntype not in ["matrix", "mail"]:
|
if ntype not in ["matrix", "mail"]:
|
||||||
return ("Invalid type, only matrix or mail allowed", 400)
|
return ("Invalid type, only matrix or mail allowed", 400)
|
||||||
|
|
||||||
print(ntype, username, token)
|
|
||||||
|
|
||||||
apobj = apprise.Apprise()
|
apobj = apprise.Apprise()
|
||||||
if ntype == "matrix":
|
if ntype == "matrix":
|
||||||
# try to get a room_id
|
# try to get a room_id
|
||||||
|
@ -225,8 +220,6 @@ def send_notification():
|
||||||
if res:
|
if res:
|
||||||
room_id = res[0]
|
room_id = res[0]
|
||||||
|
|
||||||
print(room_id)
|
|
||||||
|
|
||||||
if not room_id:
|
if not room_id:
|
||||||
return ("No room_id specified, and no default saved", 400)
|
return ("No room_id specified, and no default saved", 400)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue