refactor
This commit is contained in:
parent
250efce52c
commit
1baef032e8
|
|
@ -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');
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue