Add ability to add new http functions (Needs refactor, bad stuff)
This commit is contained in:
4
db.py
4
db.py
@@ -55,3 +55,7 @@ class DataBase():
|
||||
http_function = self.execute(
|
||||
'SELECT id, NAME, script_content, invoked_count FROM http_functions WHERE NAME=%s', [name], one=True)
|
||||
return http_function
|
||||
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user