Skip to content

Commit

Permalink
refactor: response status 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
jjeonghak committed Nov 25, 2024
1 parent c02d7e6 commit 58318dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/server/src/project/controller/project.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { SprintService } from '@/project/service/sprint.service';
import { SprintDetailsRequest } from '@/project/dto/sprint-details-request.dto';
import { LabelService } from '@/project/service/label.service';
import { LabelDetailsRequest } from '@/project/dto/label-details-request.dto';
import { ResponseStatus } from '@/common/decorator/response-status.decorator';

@UseGuards(AccessTokenGuard)
@Controller('project')
Expand Down Expand Up @@ -53,6 +54,7 @@ export class ProjectController {
}

@Post()
@ResponseStatus(201)
@ResponseMessage('프로젝트 생성이 성공했습니다.')
async create(@AuthUser() user: Account, @Body() body: CreateProjectRequest) {
return this.projectService.create(user.id, body.title);
Expand Down Expand Up @@ -133,6 +135,7 @@ export class ProjectController {
}

@Post(':id/label')
@ResponseStatus(201)
@ResponseMessage('라벨 생성 완료했습니다.')
async createLabel(
@AuthUser() user: Account,
Expand Down
2 changes: 2 additions & 0 deletions apps/server/src/task/controller/task.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { SubTaskService } from '@/task/service/subTask.service';
import { CreateSubTaskRequest } from '@/task/dto/create-subTask-request.dto';
import { UpdateLabelsRequest } from '@/task/dto/update-labels-request.dto';
import { UpdateAssigneesRequest } from '@/task/dto/update-assignees-request.dto';
import { ResponseStatus } from '@/common/decorator/response-status.decorator';

@UseGuards(AccessTokenGuard)
@Controller('task')
Expand Down Expand Up @@ -41,6 +42,7 @@ export class TaskController {
}

@Post(':id/subtask')
@ResponseStatus(201)
@ResponseMessage('서브 태스크 생성 완료했습니다.')
async create(
@AuthUser() user: Account,
Expand Down

0 comments on commit 58318dc

Please sign in to comment.