Add edit form for http functions

This commit is contained in:
Peter Stockings
2023-12-16 21:56:35 +11:00
parent d8b441374e
commit 2365fa3987
4 changed files with 180 additions and 3 deletions

4
db.py
View File

@@ -59,3 +59,7 @@ class DataBase():
def create_new_http_function(self, name, script_content):
self.execute(
'INSERT INTO http_functions (NAME, script_content) VALUES (%s, %s)', [name, script_content], commit=True)
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)