Add ability to delete http functions

This commit is contained in:
Peter Stockings
2023-12-16 22:35:28 +11:00
parent 2365fa3987
commit 204000a668
5 changed files with 97 additions and 34 deletions

4
db.py
View File

@@ -63,3 +63,7 @@ class DataBase():
def edit_http_function(self, name, script_content):
self.execute(
'UPDATE http_functions SET script_content=%s WHERE NAME=%s', [script_content, name], commit=True)
def delete_http_function(self, name):
self.execute(
'DELETE FROM http_functions WHERE NAME=%s', [name], commit=True)