Use url_for to generate url for http functions on overview page
This commit is contained in:
@@ -1,13 +1,8 @@
|
||||
def create_http_function_view_model(http_function):
|
||||
# Base URL for the function invocation
|
||||
base_url = "https://function.peterstockings.com/f/"
|
||||
|
||||
name = http_function['name']
|
||||
function_view_model = {
|
||||
"id": http_function['id'],
|
||||
"name": name,
|
||||
"name": http_function['name'],
|
||||
"script_content": http_function['script_content'],
|
||||
"url": f"{base_url}{name}",
|
||||
"invoked_count": http_function['invoked_count'],
|
||||
"environment_info": http_function['environment_info']
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user