Skip to content

Commit cc9591d

Browse files
steevsachsmarioestradarosa
authored andcommitted
fix(cli): fix cli rest controller generator template
Co-authored-by: Mario Estrada <marioestradarosa@yahoo.com>
1 parent 534895d commit cc9591d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/cli/generators/controller/templates/src/controllers/controller-rest-template.ts.ejs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ export class <%= className %>Controller {
3535

3636
@patch('<%= httpPathName %>')
3737
async updateAll(
38-
@requestBody() obj: <%= modelName %>
39-
@param.query.string('where') where?: Where,
38+
@requestBody() obj: <%= modelName %>,
39+
@param.query.string('where') where?: Where
4040
): Promise<number> {
4141
return await this.<%= repositoryNameCamel %>.updateAll(obj, where);
4242
}

packages/cli/test/integration/generators/controller.integration.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ function checkRestCrudContents() {
256256
);
257257
assert.fileContent(
258258
expectedFile,
259-
/\@patch\('\/product-reviews'\)\s{1,}async updateAll\(\s{1,}\@requestBody\(\).*\s{1,}\@param.query.string\('where'\) where\?: Where,/,
259+
/\@patch\('\/product-reviews'\)\s{1,}async updateAll\(\s{1,}\@requestBody\(\).*,\s{1,}\@param.query.string\('where'\) where\?: Where/,
260260
);
261261
assert.fileContent(
262262
expectedFile,

0 commit comments

Comments
 (0)