Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 11 additions & 16 deletions src/apis/avatars/avatarApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,37 @@ import {
FinalChoiceAvatarRequest,
FinalChoiceAvatarResponse,
} from "@/types/avatars/masters";
import { AvatarType } from "@/types/avatars/masters";
import { ApiResponse, GlobalResponse } from "@/types/common/apiResponse.type";

import axios from "@/apis/instance";

export const getSelectionAvatarApi = async () => {
try {
const response = await axios.get("/api/v1/avatars/masters");
return response.data;
} catch (error) {
alert("회원가입에 실패했습니다.");
console.log(error);
}
export const getSelectionAvatarApi = async (): ApiResponse<AvatarType> => {
return axios.get("/api/v1/avatars/masters").then(res => res.data);
};
Comment on lines +13 to 15
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

타입 불일치: 배열 반환으로 수정 + 제네릭 지정 누락

해당 엔드포인트는 선택 가능한 아바타 목록을 반환하므로 배열 타입이 맞습니다. 또한 axios.getGlobalResponse 제네릭을 지정해 타입 안전성을 확보해 주세요.

-export const getSelectionAvatarApi = async (): ApiResponse<AvatarType> => {
-  return axios.get("/api/v1/avatars/masters").then(res => res.data);
-};
+export const getSelectionAvatarApi = (): ApiResponse<AvatarType[]> => {
+  return axios
+    .get<GlobalResponse<AvatarType[]>>("/api/v1/avatars/masters")
+    .then(res => res.data);
+};

관련 훅(src/hooks/avatars/useGetSelectAvatarApi.ts)과 페이지가 AvatarType[]을 기대하는지 최종 확인 부탁드립니다.


🏁 Script executed:

#!/bin/bash
# 1. 파일 존재 여부 확인
echo "🔍 Searching for avatarApi and hook files"
API_FILE=$(fd --hidden --ignore-case 'avatarApi.ts' -p)
HOOK_FILE=$(fd --hidden --ignore-case 'useGetSelectAvatarApi.ts' -p)
echo "API_FILE: $API_FILE"
echo "HOOK_FILE: $HOOK_FILE"

# 2. API 함수 정의 확인
if [[ -f "$API_FILE" ]]; then
  echo "🔍 Contents of $API_FILE (lines 1-50):"
  sed -n '1,50p' "$API_FILE"
else
  echo "$API_FILE not found"
fi

# 3. Hook 파일에서 반환 타입 확인
if [[ -f "$HOOK_FILE" ]]; then
  echo "🔍 Contents of $HOOK_FILE (lines 1-50):"
  sed -n '1,50p' "$HOOK_FILE"
else
  echo "$HOOK_FILE not found"
fi

# 4. AvatarType 정의 위치 및 형태 확인
echo "🔍 Searching for AvatarType definition and usages"
rg -nP "type\s+AvatarType\b|interface\s+AvatarType\b" -C2 .

Length of output: 2763


아래 스크립트로 API 함수 정의와 ApiResponse·GlobalResponse 타입을 확인해 주세요.


🏁 Script executed:

#!/bin/bash
# 1. avatarApi.ts 파일 내용 확인
echo "🔍 src/apis/avatars/avatarApi.ts (1-200):"
sed -n '1,200p' src/apis/avatars/avatarApi.ts || echo "❌ 파일을 찾을 수 없습니다."

# 2. apiResponse.type 파일 위치 검색
echo "🔍 apiResponse.type 파일 검색:"
TYPE_FILE=$(fd --extension ts --ignore-case 'apiResponse.type' -p src/types/common)
echo "TYPE_FILE: $TYPE_FILE"

# 3. ApiResponse·GlobalResponse 정의 확인
if [[ -n "$TYPE_FILE" ]]; then
  echo "🔍 $TYPE_FILE 에서 ApiResponse·GlobalResponse 정의 확인:"
  sed -n '1,200p' "$TYPE_FILE"
else
  echo "❌ apiResponse.type 파일을 찾을 수 없습니다."
fi

Length of output: 2240


getSelectionAvatarApi 반환 타입 및 제네릭 수정 필요

  • getSelectionAvatarApi 시그니처를 ApiResponse<AvatarType[]>로 변경
  • axios.get 호출에 <GlobalResponse<AvatarType[]>> 제네릭 지정
  • 사용 중인 훅(useGetSelectAvatar)의 AvatarType[] 기대값과 일치하도록 반영해주세요.
🤖 Prompt for AI Agents
In src/apis/avatars/avatarApi.ts around lines 13 to 15, the function currently
returns ApiResponse<AvatarType> but the endpoint returns an array; change the
signature to ApiResponse<AvatarType[]> and update the axios.get call to use the
generic GlobalResponse<AvatarType[]> so the resolved data type matches the
AvatarType[] expected by useGetSelectAvatar; ensure the Promise return/then
typing aligns with these generics.


export const postCrationAvatarApi = async (
formData: FormData
): Promise<CreateAvatarResponse> => {
): ApiResponse<CreateAvatarResponse> => {
try {
const response = await Axios.post(
const response = await Axios.post<GlobalResponse<CreateAvatarResponse>>(
"http://43.200.84.255:8000/process-image",
formData
);
return response.data;
} catch (error) {
console.error("error :", error);
console.error("이미지 생성 실패:", error);
throw error;
}
};

export const finalChoiceAvatarApi = async (
data: FinalChoiceAvatarRequest
): Promise<FinalChoiceAvatarResponse> => {
): ApiResponse<FinalChoiceAvatarResponse> => {
try {
const response = await axios.post<FinalChoiceAvatarResponse>(
"/api/v1/avatars",
data
);
const response = await axios.post<
GlobalResponse<FinalChoiceAvatarResponse>
>("/api/v1/avatars", data);
return response.data;
} catch (error) {
console.error("아바타 선택 실패:", error);
Expand Down
28 changes: 12 additions & 16 deletions src/apis/missions/QuizApi.ts
Original file line number Diff line number Diff line change
@@ -1,36 +1,32 @@
import { AnswerQuizResponse } from "@/types/realQuiz/answerQuiz";
import { ApiResponse, GlobalResponse } from "@/types/common/apiResponse.type";
import {
AnswerQuizRequest,
AnswerQuizResponse,
} from "@/types/realQuiz/answerQuiz";
import { getQuizRequest, getQuizResponse } from "@/types/realQuiz/getQuiz";

import axios from "@/apis/instance";

export const getQuizApi = async (
params: getQuizRequest
): Promise<getQuizResponse> => {
try {
const response = await axios.get("/api/v1/realQuiz", { params });

return response.data;
} catch (error) {
console.error("Error get MissionPanel:", error);
throw error;
}
): ApiResponse<getQuizResponse> => {
return axios.get("/api/v1/realQuiz", { params }).then(res => res.data);
};

export const postAnswerQuizApi = async ({
selectedOptionOrder,
quizId,
}: {
selectedOptionOrder: number;
quizId: number;
}): Promise<AnswerQuizResponse> => {
}: AnswerQuizRequest & { quizId: number }): Promise<
GlobalResponse<AnswerQuizResponse>
> => {
try {
const response = await axios.post<AnswerQuizResponse>(
const response = await axios.post<GlobalResponse<AnswerQuizResponse>>(
`/api/v1/realQuiz/${quizId}/answer`,
{ selectedOptionOrder }
);
return response.data;
} catch (error) {
console.error("Error post Answer Quiz:", error);
console.error("퀴즈 답안 제출 실패:", error);
throw error;
}
};
24 changes: 7 additions & 17 deletions src/apis/missions/writeDiaryApi.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { ApiResponse } from "@/types/common/apiResponse.type";
import {
writeDiaryImageUploadResponse,
writeDiarySubmitRequest,
Expand All @@ -7,26 +8,15 @@ import {
import axios from "@/apis/instance";

// 이미지 전송 API
export const takePhotoUploadApi = async (

export const takePhotoUploadApi = (
formData: FormData
): Promise<writeDiaryImageUploadResponse> => {
try {
const response = await axios.post("/api/v1/diaries/images", formData);
return response.data;
} catch (error) {
console.error("Error post TakePhotoUpload:", error);
throw error;
}
): ApiResponse<writeDiaryImageUploadResponse> => {
return axios.post("/api/v1/diaries/images", formData).then(res => res.data);
};

export const writeDiarySubmitApi = async (
params: writeDiarySubmitRequest
): Promise<writeDiarySubmitResponse> => {
try {
const response = await axios.post("/api/v1/diaries", params);
return response.data;
} catch (error) {
console.error("Error post WriteDiarySubmit:", error);
throw error;
}
): ApiResponse<writeDiarySubmitResponse> => {
return axios.post("api/v1/diaries", params).then(res => res.data);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

경로 버그: 선행 슬래시 누락으로 베이스 경로 오조합 위험

"api/v1/diaries"는 베이스 URL에 따라 의도치 않은 path가 될 수 있습니다. 반드시 "/api/v1/diaries"로 지정해 주세요.

-  return axios.post("api/v1/diaries", params).then(res => res.data);
+  return axios.post("/api/v1/diaries", params).then(res => res.data);

레포 전역에서 동일한 패턴이 있는지 점검해 주세요.


🏁 Script executed:

#!/bin/bash
rg -nP '"api/v1/[^"]+"' -g '!**/node_modules/**' -C2

Length of output: 358


경로 앞에 슬래시 추가 필요
axios 요청 시 상대 경로가 조합되어 잘못된 엔드포인트로 요청될 수 있습니다. 항상 절대 경로인 "/api/v1/diaries"로 지정해 주세요.

-  return axios.post("api/v1/diaries", params).then(res => res.data);
+  return axios.post("/api/v1/diaries", params).then(res => res.data);

레포 전역 검색 결과 해당 패턴은 이 파일 한 곳에서만 확인되었습니다.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
return axios.post("api/v1/diaries", params).then(res => res.data);
return axios.post("/api/v1/diaries", params).then(res => res.data);
🤖 Prompt for AI Agents
In src/apis/missions/writeDiaryApi.ts around line 21, the axios POST is using a
relative path "api/v1/diaries" which can be combined incorrectly with the
current URL; change it to the absolute path "/api/v1/diaries" so the request
always targets the correct endpoint (update the axios.post call to use
"/api/v1/diaries").

};
11 changes: 7 additions & 4 deletions src/hooks/avatars/useFinalChoiceAvatarApi.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
import { useMutation } from "@tanstack/react-query";
import { AxiosError } from "axios";

import {
FinalChoiceAvatarRequest,
FinalChoiceAvatarResponse,
} from "@/types/avatars/masters";
import { ErrorResponse, GlobalResponse } from "@/types/common/apiResponse.type";

import { finalChoiceAvatarApi } from "@/apis/avatars/avatarApi";

export const useFinalChoiceAvatar = () => {
return useMutation<
FinalChoiceAvatarResponse,
Error,
GlobalResponse<FinalChoiceAvatarResponse>,
AxiosError<ErrorResponse>,
FinalChoiceAvatarRequest
>({
mutationFn: data => finalChoiceAvatarApi(data),
onSuccess: data => {
console.log("아바타 최종 선택 성공:", data);
console.log("아바타 최종 선택 성공:", data.result);
},
onError: error => {
alert("아바타 최종 선택에 실패했습니다.");
console.error(error);
console.error(error.response?.data || error.message);
},
retry: 1,
});
};
15 changes: 13 additions & 2 deletions src/hooks/avatars/useGetSelectAvatarApi.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
import { useQuery } from "@tanstack/react-query";
import { AxiosError } from "axios";

import { SelectAvatarResponse } from "@/types/avatars/masters";
import { AvatarType } from "@/types/avatars/masters";
import { ErrorResponse, GlobalResponse } from "@/types/common/apiResponse.type";

import { getSelectionAvatarApi } from "@/apis/avatars/avatarApi";

export const useGetSelectAvatar = () => {
return useQuery<SelectAvatarResponse, Error>({
return useQuery<
GlobalResponse<AvatarType[]>,
AxiosError<ErrorResponse>,
AvatarType[]
>({
queryKey: ["selectionAvatar"],
queryFn: getSelectionAvatarApi,
select: data => data.result,
Comment on lines +10 to +17
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

API 반환 타입과 훅 제네릭 일치 여부 확인 필요

훅은 GlobalResponse<AvatarType[]>를 가정하고 select로 배열을 언래핑합니다. 관련 API(getSelectionAvatarApi)가 ApiResponse<AvatarType[]>를 반환하는지 확인해 주세요. 단수형이면 컴파일/런타임 불일치가 발생합니다.

다음 스크립트로 선언을 확인하세요:


🏁 Script executed:

#!/bin/bash
# getSelectionAvatarApi 시그니처와 반환 제네릭 확인
rg -nP -C2 'export\s+const\s+getSelectionAvatarApi\s*=\s*async' src | sed -n '1,120p'
rg -nP 'getSelectionAvatarApi.*ApiResponse<\s*AvatarType(\[\])?\s*>' -C1 src

Length of output: 760


API 반환 타입과 훅 제네릭 일치시키기
getSelectionAvatarApi는 현재 ApiResponse를 반환하고 있어, useQuery 훅의 제네릭(GlobalResponse<AvatarType[]>)과 불일치합니다. 배열 언래핑(select) 시 컴파일/런타임 에러가 발생하므로, 제네릭을 GlobalResponse으로 변경하거나 getSelectionAvatarApi의 반환 타입을 ApiResponse<AvatarType[]>로 수정하세요.

🤖 Prompt for AI Agents
In src/hooks/avatars/useGetSelectAvatarApi.ts around lines 10-17, the useQuery
generics expect GlobalResponse<AvatarType[]> but getSelectionAvatarApi currently
returns ApiResponse<AvatarType>, causing a mismatch when select unwraps an
array; fix by making the types consistent: either change the hook generics to
GlobalResponse<AvatarType> (and adjust select to return a single AvatarType) or
update getSelectionAvatarApi to return ApiResponse<AvatarType[]> so useQuery can
keep GlobalResponse<AvatarType[]> and select: data => data.result remains valid;
ensure imports/types reflect the chosen shape and update any callers
accordingly.

staleTime: 1000 * 60 * 120,
gcTime: 1000 * 60 * 5,
retry: 1,
refetchOnWindowFocus: true,
});
};
12 changes: 10 additions & 2 deletions src/hooks/mission/useGetQuizApi.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
import { useQuery } from "@tanstack/react-query";
import { AxiosError } from "axios";

import { ApiResponse, ErrorResponse } from "@/types/common/apiResponse.type";
import { getQuizRequest, getQuizResponse } from "@/types/realQuiz/getQuiz";

import { getQuizApi } from "@/apis/missions/QuizApi";

export const useGetQuiz = (params: getQuizRequest) => {
return useQuery<getQuizResponse>({
return useQuery<
ApiResponse<getQuizResponse>, // 서버 전체 응답 타입
AxiosError<ErrorResponse>, // Axios 확장 에러 타입
getQuizResponse // select로 실제 사용할 데이터 타입
>({
Comment on lines +10 to +14
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

useQuery 제네릭 오용 및 select 누락으로 인한 타입/런타임 불일치

  • 현재 첫 번째 제네릭에 ApiResponse<...>(= Promise<GlobalResponse<...>>)를 넣어 Promise가 중첩됩니다. TQueryFnData는 “해결된” 데이터(= GlobalResponse<T>)여야 합니다.
  • TDatagetQuizResponse로 지정했지만 select가 없어 실제로는 언래핑되지 않습니다. 호출부에서 data.quizId를 바로 쓰면 런타임 오류가 납니다.

아래처럼 수정 제안합니다.

-import { ApiResponse, ErrorResponse } from "@/types/common/apiResponse.type";
+import { GlobalResponse, ErrorResponse } from "@/types/common/apiResponse.type";-  return useQuery<
-    ApiResponse<getQuizResponse>, // 서버 전체 응답 타입
-    AxiosError<ErrorResponse>, // Axios 확장 에러 타입
-    getQuizResponse // select로 실제 사용할 데이터 타입
-  >({
+  return useQuery<
+    GlobalResponse<getQuizResponse>, // 서버 전체 응답 타입(해결된 데이터)
+    AxiosError<ErrorResponse>,
+    getQuizResponse // select로 실제 사용할 데이터 타입
+  >({
     queryKey: ["quiz", params],
     queryFn: () => getQuizApi(params),
+    select: (data) => data.result,
     staleTime: 1000 * 60 * 5, // 5분 동안 stale 처리 안함
     retry: 1, // 실패 시 1번 재시도
     refetchOnWindowFocus: false, // 창 포커스 시 재요청 X
   });

또는 ApiResponse<T>를 “Promise”가 아닌 “서버 바디”로 재정의하고, ApiPromise<T>를 새로 두는 것도 장기적으로 안전합니다(아래 별도 코멘트 참고).

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
return useQuery<
ApiResponse<getQuizResponse>, // 서버 전체 응답 타입
AxiosError<ErrorResponse>, // Axios 확장 에러 타입
getQuizResponse // select로 실제 사용할 데이터 타입
>({
import { GlobalResponse, ErrorResponse } from "@/types/common/apiResponse.type";
import { useQuery } from "@tanstack/react-query";
import { getQuizApi, getQuizResponse } from "@/api/mission/quiz";
import type { AxiosError } from "axios";
export function useGetQuizApi(params: Parameters<typeof getQuizApi>[0]) {
- return useQuery<
- ApiResponse<getQuizResponse>, // 서버 전체 응답 타입
- AxiosError<ErrorResponse>, // Axios 확장 에러 타입
- getQuizResponse // select로 실제 사용할 데이터 타입
return useQuery<
GlobalResponse<getQuizResponse>, // 서버 전체 응답 타입(해결된 데이터)
AxiosError<ErrorResponse>,
getQuizResponse // select로 실제 사용할 데이터 타입
>({
queryKey: ["quiz", params],
queryFn: () => getQuizApi(params),
select: (data) => data.result,
staleTime: 1000 * 60 * 5, // 5분 동안 stale 처리 안함
retry: 1, // 실패 시 1번 재시도
refetchOnWindowFocus: false, // 창 포커스 시 재요청 X
});
}

queryKey: ["quiz", params],

queryFn: () => getQuizApi(params),
staleTime: 1000 * 60 * 5, // 5분 동안 stale 처리 안함
retry: 1, // 실패 시 1번 재시도
refetchOnWindowFocus: false, // 창 포커스 시 재요청 X
});
};
19 changes: 17 additions & 2 deletions src/hooks/mission/usePostAnswerQuiz.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { useMutation } from "@tanstack/react-query";
import { AxiosError } from "axios";

import { ErrorResponse, GlobalResponse } from "@/types/common/apiResponse.type";
import { AnswerQuizResponse } from "@/types/realQuiz/answerQuiz";

import { postAnswerQuizApi } from "@/apis/missions/QuizApi";
Expand All @@ -10,8 +12,21 @@ interface AnswerQuizParams {
}

export const useAnswerQuiz = () => {
return useMutation<AnswerQuizResponse, Error, AnswerQuizParams>({
mutationFn: ({ quizId, selectedOptionOrder }) =>
return useMutation<
GlobalResponse<AnswerQuizResponse>, // 성공 응답 타입
AxiosError<ErrorResponse>, // 에러 타입
AnswerQuizParams // 요청 파라미터 타입
>({
mutationFn: ({ quizId, selectedOptionOrder }: AnswerQuizParams) =>
postAnswerQuizApi({ quizId, selectedOptionOrder }),
onSuccess: data => {
console.log("퀴즈 답안 제출 성공:", data.result);
},
onError: error => {
console.error(
"퀴즈 답안 제출 실패:",
error.response?.data || error.message
);
},
});
};
28 changes: 16 additions & 12 deletions src/hooks/mission/useWriteDiaryApi.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// src/hooks/mission/useWriteDiaryApi.ts
import { useMutation, useQueryClient } from "@tanstack/react-query";
import { AxiosError } from "axios";

import { ErrorResponse, GlobalResponse } from "@/types/common/apiResponse.type";
import {
WriteDiaryImageUploadRequest,
writeDiaryImageUploadResponse,
writeDiarySubmitRequest,
writeDiarySubmitResponse,
Expand All @@ -16,30 +19,31 @@ export const useWriteDiaryImageUploadApi = () => {
const queryClient = useQueryClient();

return useMutation<
writeDiaryImageUploadResponse,
Error,
{ formData: FormData }
GlobalResponse<writeDiaryImageUploadResponse>,
AxiosError<ErrorResponse>,
WriteDiaryImageUploadRequest
>({
mutationFn: ({ formData }) => takePhotoUploadApi(formData),
onSuccess: data => {
console.log("일기 사진 업로드 성공:", data);

onSettled: () => {
queryClient.invalidateQueries({ queryKey: ["diaries"] });
},

onError: error => {
console.error("일기 사진 업로드 실패:", error);
console.error(
"이미지 업로드 실패:",
error.response?.data || error.message
);
},
retry: 1,
});
};

export const useWriteDiarySubmitApi = () => {
const queryClient = useQueryClient();

return useMutation<
writeDiarySubmitResponse, // 성공 응답 타입
Error, // 에러 타입
writeDiarySubmitRequest // 요청 타입
GlobalResponse<writeDiarySubmitResponse>,
AxiosError<ErrorResponse>,
writeDiarySubmitRequest
>({
mutationFn: body => writeDiarySubmitApi(body),
onSuccess: data => {
Expand All @@ -48,7 +52,7 @@ export const useWriteDiarySubmitApi = () => {
queryClient.invalidateQueries({ queryKey: ["diaries"] });
},
onError: error => {
console.error("일기 작성 실패:", error);
console.error("일기 작성 실패:", error.response?.data || error.message);
},
});
};
14 changes: 7 additions & 7 deletions src/pages/registration/SelectionDetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ const SelectionDetailPage = () => {
const [selectedId, setSelectedId] = useState<number | null>(null);

useEffect(() => {
if (data?.result && data.result.length > 0 && selectedId === null) {
setSelectedId(data.result[0].id);
if (data && data.length > 0 && selectedId === null) {
setSelectedId(data[0].id);
}
}, [data, selectedId]);

const handleNextClick = () => {
if (selectedId === null || !data?.result) return;
if (selectedId === null || !data) return;

const selectedAvatar = data.result.find(
const selectedAvatar = data.find(
(avatar: AvatarType) => avatar.id === selectedId
);

Expand Down Expand Up @@ -61,10 +61,10 @@ const SelectionDetailPage = () => {
<div className="text-heading1 pt-8 pl-6.25">
원하는 아바타를 선택해주세요.
</div>
<main className="flex-1 ">
{data?.result && selectedId !== null && (
<main className="flex-1">
{data && selectedId !== null && (
<SelectionDetail
avatars={data.result}
avatars={data}
selectedId={selectedId}
onSelect={setSelectedId}
/>
Expand Down
16 changes: 2 additions & 14 deletions src/types/avatars/masters.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
// 아바타 선택하기 조회 API 응답 타입
export interface AvatarType {
id: number;
defaultImageUrl: string;
description: string;
}

// 아바타 선택하기 조회 API 응답 타입
export interface SelectAvatarResponse {
isSuccess: boolean;
code: string;
message: string;
result: AvatarType[];
}

// 아바타 생성하기 응답 타입
export interface CreateAvatarResponse {
imageUrl: string;
Expand All @@ -24,9 +17,4 @@ export interface FinalChoiceAvatarRequest {
masterId: number;
}

export interface FinalChoiceAvatarResponse {
isSuccess: boolean;
code: string;
message: string;
result: string;
}
export type FinalChoiceAvatarResponse = string;
Loading