Skip to content

Commit

Permalink
Merge pull request #25589 from lemniscus/api4-explorer-cv-syntax-shor…
Browse files Browse the repository at this point in the history
…t-boolean

api4 explorer: make boolean params work in cv (short syntax)
  • Loading branch information
totten authored Feb 17, 2023
2 parents 6daf8d6 + d0af60d commit 5046f62
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ang/api4Explorer/Explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,9 @@
code.short += ' +l ' + (params.limit || '0') + (params.offset ? ('@' + params.offset) : '');
}
break;
case (typeof param === 'boolean'):
code.short += ' ' + key + '=' + (param ? 1 : 0);
break;
default:
code.short += ' ' + key + '=' + (typeof param === 'string' ? cliFormat(param) : cliFormat(JSON.stringify(param)));
}
Expand Down

0 comments on commit 5046f62

Please sign in to comment.