Skip to content

Commit a94556f

Browse files
Merge pull request #12 from pedrogoncalvesk/release/v0.2.0
Release/v0.2.0
2 parents f6ab63b + 3ae4cac commit a94556f

File tree

3 files changed

+22
-25
lines changed

3 files changed

+22
-25
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "act-api",
3-
"version": "0.1.0",
3+
"version": "0.2.0",
44
"description": "Activities API",
55
"main": "dist/main.js",
66
"types": "dist/main.d.ts",

src/activities/activities.controller.ts

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import {
22
Body,
33
Controller,
4-
Delete,
54
Get,
65
Param,
76
Post,
8-
Patch,
97
Query,
108
Req,
119
ValidationPipe,
@@ -21,7 +19,6 @@ import { CreateDto } from './dto/create.dto';
2119
import { FilterPaginateDto } from './dto/filter-paginate.dto';
2220
import { GetDto } from './dto/get.dto';
2321
import { GetPaginateDto } from './dto/get-paginate.dto';
24-
import { UpdateDto } from './dto/update.dto';
2522
import { ActivitiesService } from './activities.service';
2623

2724
@Controller('activities')
@@ -76,25 +73,25 @@ export class ActivitiesController {
7673
return GetDto.factory(await this.activitiesService.findOne(id)) as GetDto;
7774
}
7875

79-
@Patch(':id')
80-
@ApiOkResponse({ type: GetDto })
81-
async update(
82-
@Param('id') id: string,
83-
@Body() data: UpdateDto,
84-
@Req() req: any,
85-
): Promise<GetDto> {
86-
try {
87-
const dataUpdated = await this.activitiesService.update(id, data);
88-
req.logger.log(`Activity id: ${dataUpdated.id} updated`);
89-
return GetDto.factory(dataUpdated) as GetDto;
90-
} catch (error) {
91-
req.logger.error(error);
92-
throw error;
93-
}
94-
}
76+
// @Patch(':id')
77+
// @ApiOkResponse({ type: GetDto })
78+
// async update(
79+
// @Param('id') id: string,
80+
// @Body() data: UpdateDto,
81+
// @Req() req: any,
82+
// ): Promise<GetDto> {
83+
// try {
84+
// const dataUpdated = await this.activitiesService.update(id, data);
85+
// req.logger.log(`Activity id: ${dataUpdated.id} updated`);
86+
// return GetDto.factory(dataUpdated) as GetDto;
87+
// } catch (error) {
88+
// req.logger.error(error);
89+
// throw error;
90+
// }
91+
// }
9592

96-
@Delete(':id')
97-
remove(@Param('id') id: string): Promise<void> {
98-
return this.activitiesService.remove(id);
99-
}
93+
// @Delete(':id')
94+
// remove(@Param('id') id: string): Promise<void> {
95+
// return this.activitiesService.remove(id);
96+
// }
10097
}

0 commit comments

Comments
 (0)