Skip to content

Commit

Permalink
feat: userHandlers 수정
Browse files Browse the repository at this point in the history
users에서 relationshipStatus를 가져오던 followInfo를 relationshipStatus에서 가져오도록 수정했습니다.
Legitgoons committed May 5, 2024
1 parent eb09bb7 commit dc53dfa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/app/mocks/handler/user.ts
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ import {
createHttpErrorResponse,
} from '../dir/response';
import { reports } from '../consts/report';
import { relationshipStatus } from '../consts/relationshipStatus';

export const userHandlers = [
// 1️⃣ 팔로우 요청
@@ -18,7 +19,7 @@ export const userHandlers = [
}

const formattedUserId = Number(user_id);
const followInfo = users[formattedUserId].relationshipStatus;
const followInfo = relationshipStatus[formattedUserId].relationshipStatus;

if (followInfo !== 'none') {
return createHttpErrorResponse('4220');
@@ -35,7 +36,7 @@ export const userHandlers = [
}

const formattedUserId = Number(user_id);
const followInfo = users[formattedUserId].relationshipStatus;
const followInfo = relationshipStatus[formattedUserId].relationshipStatus;

if (followInfo === 'self' || followInfo === 'none') {
return createHttpErrorResponse('4220');
@@ -52,7 +53,7 @@ export const userHandlers = [
}

const formattedUserId = Number(user_id);
const followInfo = users[formattedUserId].relationshipStatus;
const followInfo = relationshipStatus[formattedUserId].relationshipStatus;

if (!followInfo) {
return createHttpErrorResponse('4040');

0 comments on commit dc53dfa

Please sign in to comment.