fix: http endpoint trigger_method

The trigger_method endpoint was retrieving the access_path parameter as
a the query parameter. Instead, it should get it from the request body.
This commit is contained in:
Mose Müller 2025-01-20 06:24:45 +01:00
parent 1d8d17d715
commit 045334e51e

View File

@ -70,13 +70,13 @@ async def _trigger_method(
) -> aiohttp.web.Response:
log_id = get_log_id(request)
access_path = request.rel_url.query["access_path"]
data: TriggerMethodDict = await request.json()
access_path = data["access_path"]
logger.info("Client [%s] is triggering the method '%s'", log_id, access_path)
data: TriggerMethodDict = await request.json()
method = get_object_attr_from_path(state_manager.service, data["access_path"])
method = get_object_attr_from_path(state_manager.service, access_path)
try:
if inspect.iscoroutinefunction(method):