user_alarm_delete.py 431 B

1234567891011121314
  1. from .tool.func import *
  2. 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. conn.commit()
  10. return redirect('/alarm')