This commit is contained in:
Simon Knott 2025-02-26 16:35:27 +01:00
parent 250efce52c
commit 1baef032e8
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -118,15 +118,12 @@ export const renderAction = (
const { errors, warnings } = modelUtil.stats(action); const { errors, warnings } = modelUtil.stats(action);
const showAttachments = !!action.attachments?.length && !!revealAttachment; const showAttachments = !!action.attachments?.length && !!revealAttachment;
let apiName = action.apiName; const apiName = {
if (apiName === 'apiRequestContext.get') 'apiRequestContext.get': 'GET',
apiName = 'GET'; 'apiRequestContext.post': 'POST',
else if (apiName === 'apiRequestContext.post') 'apiRequestContext.put': 'PUT',
apiName = 'POST'; 'apiRequestContext.delete': 'DELETE',
else if (apiName === 'apiRequestContext.put') }[action.apiName] ?? action.apiName;
apiName = 'PUT';
else if (apiName === 'apiRequestContext.delete')
apiName = 'DELETE';
const parameterString = actionParameterDisplayString(action, sdkLanguage || 'javascript'); const parameterString = actionParameterDisplayString(action, sdkLanguage || 'javascript');