2
0

user_alarm_delete.py 412 B

123456789101112
  1. from .tool.func import *
  2. async def user_alarm_delete(id = ''):
  3. with get_db_connect() as conn:
  4. curs = conn.cursor()
  5. if id != '':
  6. curs.execute(db_change("delete from user_notice where name = ? and id = ?"), [ip_check(), str(id)])
  7. else:
  8. curs.execute(db_change("delete from user_notice where name = ?"), [ip_check()])
  9. return redirect(conn, '/alarm')