File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { Types, Core } from '../../{{deepness}}constants';
88{{ /unless }}
99{{ #if isResourceTemplate }}
1010import { Types, Core, Targets } from '../../{{ deepness }} constants';
11- import { Validate, Request } from '../../{{ deepness }} core/api/Validate';
11+ import { validate, request } from '../../{{ deepness }} core/api/Validate';
1212import { NotFoundException } from '../{{ deepness }} exceptions/NotFoundException';
1313import { {{ name.capitalize }} Repository } from '../{{ deepness }} repositories/{{ name.capitalize }} Repository';
1414import { {{ name.capitalize }} } from '../{{ deepness }} models/{{ name.capitalize }} ';
@@ -41,15 +41,15 @@ export class {{name.capitalize}}Service {
4141 return {{ name.camelCase }} ;
4242 }
4343
44- @Validate ()
45- public async create( @Request ({{ name.capitalize }} CreateRequest) body: any): Promise<{{name .capitalize}}> {
44+ @validate ()
45+ public async create( @request ({{ name.capitalize }} CreateRequest) body: any): Promise<{{name .capitalize}}> {
4646 // If the request body was valid we will create the {{ name.camelCase }}
4747 const {{ name.camelCase }} = await this.{{ name.camelCase }} Repo.create(body);
4848 return {{ name.camelCase }} ;
4949 }
5050
51- @Validate ()
52- public async update(id: number, @Request ({{ name.capitalize }} UpdateRequest) body: any): Promise<{{name .capitalize}}> {
51+ @validate ()
52+ public async update(id: number, @request ({{ name.capitalize }} UpdateRequest) body: any): Promise<{{name .capitalize}}> {
5353 // Find or fail
5454 const {{ name.camelCase }} = await this.findOne(id);
5555
You can’t perform that action at this time.
0 commit comments