Skip to content

Commit

Permalink
Fix: #310 프로젝트원 추방/탈퇴시 역할을 null로 처리하도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Seok93 committed Dec 24, 2024
1 parent 9ec1a6d commit 6e14d18
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/mocks/services/taskServiceHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,8 @@ const taskServiceHandler = [
const { userId } = taskUsers[i];

const projectUser = findProjectUser(projectId, userId);
if (!projectUser) return new HttpResponse(null, { status: 403 });

const role = projectUser ? findRole(projectUser.roleId) : { roleName: null };
const user = findUser(userId);
const role = findRole(projectUser.roleId);
if (!user || !role) return new HttpResponse(null, { status: 404 });

const assignee = { userId: user.userId, nickname: user.nickname, roleName: role.roleName };
Expand Down
2 changes: 1 addition & 1 deletion src/types/RoleType.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ export type RoleInfo = {

export type Role = {
roleId: number;
roleName: RoleName;
roleName: RoleName | null;
roleType: 'TEAM' | 'PROJECT';
};

0 comments on commit 6e14d18

Please sign in to comment.