File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
services/web/server/src/simcore_service_webserver/functions/_controller Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,13 @@ async def register_function(
3636) -> Envelope [RegisteredFunctionGet ]: ...
3737
3838
39+ @router .get (
40+ "/functions" ,
41+ response_model = Envelope [list [RegisteredFunctionGet ]],
42+ )
43+ async def list_functions () -> Envelope [list [RegisteredFunctionGet ]]: ...
44+
45+
3946@router .get (
4047 "/functions/{function_id}" ,
4148 response_model = Envelope [RegisteredFunctionGet ],
Original file line number Diff line number Diff line change @@ -57,6 +57,17 @@ async def register_function(request: web.Request) -> web.Response:
5757 )
5858
5959
60+ @routes .get (
61+ f"/{ VTAG } /functions" ,
62+ name = "list_functions" ,
63+ )
64+ @login_required
65+ @permission_required ("function.read" )
66+ @handle_rest_requests_exceptions
67+ async def list_functions (request : web .Request ) -> web .Response :
68+ raise NotImplementedError
69+
70+
6071@routes .get (
6172 f"/{ VTAG } /functions/{{function_id}}" ,
6273 name = "get_function" ,
@@ -76,6 +87,8 @@ async def get_function(request: web.Request) -> web.Response:
7687 product_name = req_ctx .product_name ,
7788 )
7889
90+ # TODO: enrich with project data
91+
7992 return envelope_json_response (
8093 TypeAdapter (RegisteredFunctionGet ).validate_python (
8194 registered_function .model_dump (mode = "json" )
You can’t perform that action at this time.
0 commit comments