Skip to content

Commit

Permalink
fix: schema type integer (#1294)
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Säfsten <[email protected]>
  • Loading branch information
Marfyy and martinsafsten-visma authored Apr 2, 2024
1 parent ada6a19 commit 9c11e7a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/core/src/getters/res-req-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,11 @@ const getSchemaFormDataAndUrlEncoded = ({
return `${form}${propName}.forEach(value => ${variableName}.append('data', value))\n`;
}

if (schema.type === 'number' || schema.type === 'boolean') {
if (
schema.type === 'number' ||
schema.type === 'integer' ||
schema.type === 'boolean'
) {
return `${form}${variableName}.append('data', ${propName}.toString())\n`;
}

Expand Down

0 comments on commit 9c11e7a

Please sign in to comment.