File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
services/web/server/src/simcore_service_webserver/functions/_controller Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 11from aiohttp import web
2+ from common_library .dict_tools import remap_keys
23from models_library .api_schemas_webserver .functions import (
34 Function ,
45 FunctionToRegister ,
@@ -127,9 +128,13 @@ async def list_functions(request: web.Request) -> web.Response:
127128 if project :
128129 chunk .append (
129130 TypeAdapter (RegisteredProjectFunctionGet ).validate_python (
130- function .model_dump (mode = "json" )
131+ remap_keys (
132+ function .model_dump (mode = "json" ),
133+ rename = {
134+ "uid" : "uuid" ,
135+ },
136+ )
131137 | {
132- "uuid" : function .uid ,
133138 "thumbnail" : (
134139 f"{ project .thumbnail } " if project .thumbnail else None
135140 ),
@@ -193,7 +198,12 @@ async def get_function(request: web.Request) -> web.Response:
193198
194199 return envelope_json_response (
195200 TypeAdapter (RegisteredProjectFunctionGet ).validate_python (
196- registered_function .model_dump (mode = "json" )
201+ remap_keys (
202+ registered_function .model_dump (mode = "json" ),
203+ rename = {
204+ "uid" : "uuid" ,
205+ },
206+ )
197207 | {
198208 "thumbnail" : project_dict .get ("thumbnail" , None ),
199209 "template_id" : project_dict .get ("id" , None ),
You can’t perform that action at this time.
0 commit comments