Files
function/services.py

19 lines
649 B
Python

def create_http_function_view_model(http_function):
function_view_model = {
"id": http_function['id'],
"name": http_function['name'],
"script_content": http_function['script_content'],
"invoked_count": http_function['invoked_count'],
"environment_info": http_function['environment_info']
}
return function_view_model
def create_http_functions_view_model(http_functions):
view_model = []
for function in http_functions:
function_view_model = create_http_function_view_model(function)
view_model.append(function_view_model)
return view_model