From aa607adfa106fb31da4166273e932ad2ed32e9f5 Mon Sep 17 00:00:00 2001 From: NEWJIN Date: Tue, 30 Jul 2024 16:53:56 +0900 Subject: [PATCH] =?UTF-8?q?FE-51=20:hammer:=20postEmotion=20=ED=86=A0?= =?UTF-8?q?=ED=81=B0=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/postEmotion.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/apis/postEmotion.ts b/src/apis/postEmotion.ts index 98130bc7..168a8c13 100644 --- a/src/apis/postEmotion.ts +++ b/src/apis/postEmotion.ts @@ -2,21 +2,12 @@ import { EmotionType } from '@/types/emotion'; import type { PostEmotionRequestType, PostEmotionResponseType } from '@/schema/emotion'; import { translateEmotionToEnglish } from '@/utils/emotionMap'; import httpClient from '.'; -import { getMe } from './user'; const postEmotion = async (emotion: EmotionType): Promise => { - const user = await getMe(); - if (!user) { - throw new Error('로그인이 필요합니다.'); - } - const englishEmotion = translateEmotionToEnglish(emotion); const request: PostEmotionRequestType = { emotion: englishEmotion }; - const response = await httpClient.post('/emotionLogs/today', { - ...request, - userId: user.id, - }); + const response = await httpClient.post('/emotionLogs/today', request); return response.data; };