Skip to content

Commit

Permalink
JNG-5311 fix request payloads (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
noherczeg authored Dec 7, 2023
1 parent b95ae7b commit 8a253d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const {{ simpleActionDefinitionName action.actionDefinition }} = async ({{# if a
{{# if operation.output }}const result = {{/ if }}await {{ getServiceImplForPage page }}.{{ operation.name }}{{ operationCallSuffix action }}(
{{# if page.container.form }}
{{# unless operation.isStatic }}ownerData{{/ unless }}
{{# if operation.input }}{{# unless operation.isStatic }}, {{/ unless }}data{{/ if }}
{{# if operation.input }}{{# unless operation.isStatic }}, {{/ unless }}payloadDiff.current{{/ if }}
{{ else }}
{{# if page.container.isSelector }}
{{# unless operation.isStatic }}ownerData, {{/ unless }}selectionDiff[0]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const {{ simpleActionDefinitionName action.actionDefinition }} = async () => {
try {
setIsLoading(true);
const res = await {{ getServiceImplForPage page }}.create{{# if action.targetDataElement }}{{ firstToUpper action.targetDataElement.name }}{{/ if }}({{# unless action.ownerDataElement.isAccess }}ownerData, {{/ unless }}data);
const res = await {{ getServiceImplForPage page }}.create{{# if action.targetDataElement }}{{ firstToUpper action.targetDataElement.name }}{{/ if }}({{# unless action.ownerDataElement.isAccess }}ownerData, {{/ unless }}payloadDiff.current);
showSuccessSnack(t('judo.action.create.success', { defaultValue: 'Create successful' }));
onSubmit(res);
} catch (error) {
Expand Down

0 comments on commit 8a253d0

Please sign in to comment.