Skip to content

Commit

Permalink
[티켓모듈] 티켓 단건 조회 정책 수정
Browse files Browse the repository at this point in the history
🔨 fix(ticket): 티켓 정책 수정
  • Loading branch information
ImNM authored Aug 9, 2022
2 parents db51720 + 2eadc2e commit 4c6cf25
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions src/tickets/tickets.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,11 @@ export class TicketsController {
description: '요청 성공시',
type: Ticket
})
@ApiUnauthorizedResponse({
status: 401,
description: 'AccessToken 권한이 없을 경우'
})
// @ApiUnauthorizedResponse({
// status: 401,
// description: 'AccessToken 권한이 없을 경우'
// })
@NoAuth()
@Get('/:uuid')
getTicketByUuid(
@Param('uuid')
Expand Down
6 changes: 3 additions & 3 deletions src/tickets/tickets.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ export class TicketsService {
const ticket = await this.ticketRepository.findByUuid(ticketUuid);

//어드민이거나 Ticket.user.id === user.id 일때만 리턴
if (ticket.user.id !== user.id && user.role !== Role.Admin) {
throw new UnauthorizedException('해당 티켓에 대한 접근 권한이 없습니다');
}
// if (ticket.user.id !== user.id && user.role !== Role.Admin) {
// throw new UnauthorizedException('해당 티켓에 대한 접근 권한이 없습니다');
// }

return ticket;
}
Expand Down

0 comments on commit 4c6cf25

Please sign in to comment.