Add json object for environment info for each function, this is mutable from custom code

This commit is contained in:
Peter Stockings
2023-12-18 15:15:14 +11:00
parent 538d5083e4
commit 5cc29309d5
5 changed files with 79 additions and 24 deletions

View File

@@ -8,15 +8,13 @@ def create_http_function_view_model(http_function):
"name": name,
"script_content": http_function['script_content'],
"url": f"{base_url}{name}",
"invoke_count": http_function['invoked_count']
"invoke_count": http_function['invoked_count'],
"environment_info": http_function['environment_info']
}
return function_view_model
def create_http_functions_view_model(http_functions):
# Base URL for the function invocation
base_url = "https://function.peterstockings.com/f/"
view_model = []
for function in http_functions:
function_view_model = create_http_function_view_model(function)