@@ -15,30 +15,30 @@ export class UsersController {
15
15
return { msg : "created" } ;
16
16
}
17
17
18
- /*
19
- @Get (":id")
18
+
19
+ /* @Get (":id")
20
20
@HttpCode (HttpStatus.FOUND)
21
21
async get(@Param("id", ParseIntPipe) id: number): Promise<object> {
22
22
return { data: await this.languageService.get(id) }
23
- }
24
-
25
- @Get ()
26
- @HttpCode (HttpStatus.FOUND)
27
- async list(@Query() params: any): Promise<object> {
28
- return { data: await this.languageService.list(params) }
29
- }
23
+ }*/
24
+ /*
25
+ @Get ()
26
+ @HttpCode (HttpStatus.FOUND)
27
+ async list(@Query() params: any): Promise<object> {
28
+ return { data: await this.languageService.list(params) }
29
+ }
30
+
31
+ @Put (":id")
32
+ @HttpCode (HttpStatus.ACCEPTED)
33
+ async update(@Param("id", ParseIntPipe) id: number, @Body(new JoiValidationPipe(createUserSchema)) payload: any): Promise<object> {
34
+ return { msg: "updated", data: await this.languageService.update(id, payload) }
35
+ }
30
36
31
- @Put (":id")
32
- @HttpCode (HttpStatus.ACCEPTED)
33
- async update(@Param("id", ParseIntPipe) id: number, @Body(new JoiValidationPipe(createUserSchema)) payload: any): Promise<object> {
34
- return { msg: "updated", data: await this.languageService.update(id, payload) }
35
- }
36
-
37
- @Delete (":id")
38
- @HttpCode (HttpStatus.OK)
39
- async delete(@Param("id", ParseIntPipe) id: number): Promise<object> {
40
- let deleted = await this.languageService.delete(id)
41
- return { msg: "deleted" }
42
- }
43
- */
37
+ @Delete (":id")
38
+ @HttpCode (HttpStatus.OK)
39
+ async delete(@Param("id", ParseIntPipe) id: number): Promise<object> {
40
+ let deleted = await this.languageService.delete(id)
41
+ return { msg: "deleted" }
42
+ }
43
+ */
44
44
}
0 commit comments