Show original script as well, still need to add revert/switch version functionality

This commit is contained in:
Peter Stockings
2024-05-18 22:46:44 +10:00
parent 2b4ca571ca
commit bc4a1ae9a6
4 changed files with 59 additions and 9 deletions

2
db.py
View File

@@ -114,5 +114,5 @@ ORDER BY invocation_time DESC""", [http_function_id])
def get_http_function_history(self, function_id):
http_function_history = self.execute(
'SELECT version_id, http_function_id, script_content, version_number, updated_at FROM http_functions_versions WHERE http_function_id=%s AND version_number > 1 ORDER BY version_number DESC', [function_id])
'SELECT version_id, http_function_id, script_content, version_number, updated_at FROM http_functions_versions WHERE http_function_id=%s ORDER BY version_number DESC', [function_id])
return http_function_history