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
|
||||
if request.method == "POST":
|
||||
action = request.form.get("action", "").lower()
|
||||
print("Action", action)
|
||||
if "token" in action:
|
||||
generate_token_for_user(username)
|
||||
elif "room id" in action:
|
||||
|
@ -179,7 +178,6 @@ def send_notification():
|
|||
body = request.args.get("body", request.get_data().decode("utf-8"))
|
||||
if not body:
|
||||
body = " "
|
||||
print("BODY", body)
|
||||
token = request.authorization.token or request.authorization.password
|
||||
if not token:
|
||||
return (
|
||||
|
@ -199,7 +197,6 @@ def send_notification():
|
|||
|
||||
con = get_db()
|
||||
cur = con.cursor()
|
||||
print(token)
|
||||
res = cur.execute(
|
||||
"SELECT username FROM tokens WHERE token = ?", (token,)
|
||||
).fetchone()
|
||||
|
@ -212,8 +209,6 @@ def send_notification():
|
|||
if ntype not in ["matrix", "mail"]:
|
||||
return ("Invalid type, only matrix or mail allowed", 400)
|
||||
|
||||
print(ntype, username, token)
|
||||
|
||||
apobj = apprise.Apprise()
|
||||
if ntype == "matrix":
|
||||
# try to get a room_id
|
||||
|
@ -225,8 +220,6 @@ def send_notification():
|
|||
if res:
|
||||
room_id = res[0]
|
||||
|
||||
print(room_id)
|
||||
|
||||
if not room_id:
|
||||
return ("No room_id specified, and no default saved", 400)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue