vona-cli-set-api 1.0.200 → 1.0.202

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -45,7 +45,7 @@
45
45
  }
46
46
  },
47
47
  "dependencies": {
48
- "vona": "^5.0.118"
48
+ "vona": "^5.0.119"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@cabloy/lint": "^5.0.16",
@@ -29,19 +29,19 @@ export class Controller<%=argv.resourceNameCapitalize%> extends BeanBase {
29
29
 
30
30
  @Web.get(':id')
31
31
  @Api.body(v.object(Entity<%=argv.resourceNameCapitalize%>))
32
- async findOne(@Arg.param('id') id: TableIdentity): Promise<Entity<%=argv.resourceNameCapitalize%>> {
32
+ async findOne(@Arg.param('id', v.tableIdentity()) id: TableIdentity): Promise<Entity<%=argv.resourceNameCapitalize%>> {
33
33
  const <%=argv.resourceName%> = await this.scope.service.<%=argv.resourceName%>.findOne(id);
34
34
  if (!<%=argv.resourceName%>) this.app.throw(404);
35
35
  return <%=argv.resourceName%>;
36
36
  }
37
37
 
38
38
  @Web.patch(':id')
39
- async update(@Arg.param('id') id: TableIdentity, @Arg.body() <%=argv.resourceName%>: Dto<%=argv.resourceNameCapitalize%>Update) {
39
+ async update(@Arg.param('id', v.tableIdentity()) id: TableIdentity, @Arg.body() <%=argv.resourceName%>: Dto<%=argv.resourceNameCapitalize%>Update) {
40
40
  return await this.scope.service.<%=argv.resourceName%>.update(id, <%=argv.resourceName%>);
41
41
  }
42
42
 
43
43
  @Web.delete(':id')
44
- async remove(@Arg.param('id') id: TableIdentity) {
44
+ async remove(@Arg.param('id', v.tableIdentity()) id: TableIdentity) {
45
45
  return await this.scope.service.<%=argv.resourceName%>.remove(id);
46
46
  }
47
47
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vona-cli-set-api",
3
3
  "type": "module",
4
- "version": "1.0.200",
4
+ "version": "1.0.202",
5
5
  "description": "vona cli-set-api",
6
6
  "publishConfig": {
7
7
  "access": "public"