Fix issue where on page refresh when on function edit/new sub pages you would be redirected back to dashboard
This commit is contained in:
5
db.py
5
db.py
@@ -57,6 +57,11 @@ class DataBase():
|
||||
'SELECT id, user_id, NAME, script_content, invoked_count, environment_info, is_public, log_request, log_response FROM http_functions WHERE user_id=%s AND NAME=%s', [user_id, name], one=True)
|
||||
return http_function
|
||||
|
||||
def get_http_function_by_id(self, user_id, http_function_id):
|
||||
http_function = self.execute(
|
||||
'SELECT id, user_id, NAME, script_content, invoked_count, environment_info, is_public, log_request, log_response FROM http_functions WHERE user_id=%s AND id=%s', [user_id, http_function_id], one=True)
|
||||
return http_function
|
||||
|
||||
def create_new_http_function(self, user_id, name, script_content, environment_info, is_public, log_request, log_response):
|
||||
self.execute(
|
||||
'INSERT INTO http_functions (user_id, NAME, script_content, environment_info, is_public, log_request, log_response) VALUES (%s, %s, %s, %s, %s, %s, %s)',
|
||||
|
||||
Reference in New Issue
Block a user