Skip to content

Commit

Permalink
Remove excess closing braces from foreign key map on scaffold generat…
Browse files Browse the repository at this point in the history
…or (redwoodjs#482)

* Remove excess closing brace from foreign key map

* Update EditNameCell.js.template

* Add closing brace in correct position

* Add closing brace in correct position
  • Loading branch information
eurobob authored Apr 30, 2020
1 parent e0cfdf7 commit 955c361
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 @@ -27,7 +27,7 @@ export const Success = ({ ${singularCamelName} }) => {
})

const onSave = (input, id) => {<% if (intForeignKeys.length) { %>
const castInput = Object.assign(input, { <% intForeignKeys.forEach(key => { %>${key}: parseInt(input.${key}), }<% }) %>)<% } %>
const castInput = Object.assign(input, { <% intForeignKeys.forEach(key => { %>${key}: parseInt(input.${key}), <% }) %>})<% } %>
update${singularPascalName}({ variables: { id, <% if (intForeignKeys.length) { %>input: castInput<% } else { %>input<% } %> } })
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const New${singularPascalName} = () => {
})

const onSave = (input) => {<% if (intForeignKeys.length) { %>
const castInput = Object.assign(input, { <% intForeignKeys.forEach(key => { %>${key}: parseInt(input.${key}), }<% }) %>)<% } %>
const castInput = Object.assign(input, { <% intForeignKeys.forEach(key => { %>${key}: parseInt(input.${key}), <% }) %>})<% } %>
create${singularPascalName}({ variables: { <% if (intForeignKeys.length) { %>input: castInput<% } else { %>input<% } %> } })
}

Expand Down

0 comments on commit 955c361

Please sign in to comment.