Skip to content

Commit

Permalink
Refactor: 권한 없을시 오류 메시지 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
koomin1227 committed Apr 8, 2024
1 parent 1482e10 commit 07aa78e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/auth/guard/ownership.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
ForbiddenException,
Injectable,
} from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport';

@Injectable()
export class OwnershipGuard implements CanActivate {
Expand All @@ -13,7 +12,7 @@ export class OwnershipGuard implements CanActivate {
const requestedUserId = request.params.id;
const userId = request.user.userId;
if (requestedUserId !== userId) {
throw new ForbiddenException('삭제할 권한이 없습니다.');
throw new ForbiddenException('수정할 권한이 없습니다.');
}

return true;
Expand Down

0 comments on commit 07aa78e

Please sign in to comment.