Clean up Advoware proxy steps: remove redundant /api/ from paths, simplify method-specific code, and fix DELETE json_data
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user