Clean up Advoware proxy steps: remove redundant /api/ from paths, simplify method-specific code, and fix DELETE json_data

This commit is contained in:
root
2025-10-19 16:03:11 +00:00
parent bed1008337
commit 1f893812b2
5 changed files with 8 additions and 39 deletions

View File

@@ -4,7 +4,7 @@ config = {
'type': 'api',
'name': 'Advoware Proxy DELETE',
'description': 'Universal proxy for Advoware API (DELETE)',
'path': '/api/advoware/proxy/delete',
'path': '/advoware/proxy',
'method': 'DELETE',
'emits': [],
'flows': ['advoware']
@@ -20,7 +20,7 @@ async def handler(req, context):
advoware = AdvowareAPI(context)
method = 'DELETE' # Feste Methode für diesen Step
params = {k: v for k, v in req.get('queryParams', {}).items() if k != 'endpoint'}
json_data = req.get('body')
json_data = None
context.logger.info(f"Proxying request to Advoware: {method} {endpoint}")
result = await advoware.api_call(endpoint, method=method, params=params, json_data=json_data)