diff --git a/frontend/src/apis/checklist.ts b/frontend/src/apis/checklist.ts index 0d16a9c0b..94879fe5e 100644 --- a/frontend/src/apis/checklist.ts +++ b/frontend/src/apis/checklist.ts @@ -40,7 +40,7 @@ export const postChecklist = async (checklist: ChecklistPostForm) => { export const putChecklist = async (id: number, checklist: ChecklistPostForm) => { const mappedRoomInfo = roomInfoApiMapper(checklist.room); const mappedChecklist = { ...checklist, room: mappedRoomInfo }; - const response = await fetcher.put({ url: BASE_URL + ENDPOINT.CHECKLIST_ID(id), body: mappedChecklist }); + const response = await fetcher.put({ url: BASE_URL + ENDPOINT.CHECKLIST_ID_V1(id), body: mappedChecklist }); return response; }; diff --git a/frontend/src/hooks/useRoomInfoValidated.ts b/frontend/src/hooks/useRoomInfoValidated.ts index 7c0c1c152..d5d8482af 100644 --- a/frontend/src/hooks/useRoomInfoValidated.ts +++ b/frontend/src/hooks/useRoomInfoValidated.ts @@ -19,7 +19,7 @@ const validators: Record = { deposit: [isNumericValidator, nonNegativeValidator], rent: [isNumericValidator, nonNegativeValidator], maintenanceFee: [isNumericValidator, nonNegativeValidator], - contractTerm: [isNumericValidator, nonNegativeValidator], + contractTerm: [isNumericValidator, nonNegativeValidator, inRangeValidator(0, 10000)], type: [], size: [isNumericValidator], floor: [isIntegerValidator, positiveValidator], diff --git a/frontend/src/hooks/useTabs.ts b/frontend/src/hooks/useTabs.ts index 71a3359a8..43421269c 100644 --- a/frontend/src/hooks/useTabs.ts +++ b/frontend/src/hooks/useTabs.ts @@ -9,7 +9,7 @@ const useTabs = () => { const getTabs = (categories: Category[]) => { return categories.map(category => ({ id: category.categoryId, - name: category.categoryName as string, + name: category.categoryName, className: findCategoryClassNameByName(category.categoryName), })) as Tab[]; }; diff --git a/frontend/src/store/roomInfoStore.ts b/frontend/src/store/roomInfoStore.ts index e3dcd0b2a..ac02ed039 100644 --- a/frontend/src/store/roomInfoStore.ts +++ b/frontend/src/store/roomInfoStore.ts @@ -113,7 +113,9 @@ export const roomInfoApiMapper = (values: Partial) => { occupancyMonth: values.occupancyMonth === 0 ? undefined : values.occupancyMonth, }; - return mapObjUndefinedToNull(result) as Nullable>; + const { station: _, ...resultToSubmit } = result; + + return mapObjUndefinedToNull(resultToSubmit) as Nullable>; }; export default roomInfoStore; diff --git a/frontend/src/types/category.ts b/frontend/src/types/category.ts index 397c5e721..df48b4b85 100644 --- a/frontend/src/types/category.ts +++ b/frontend/src/types/category.ts @@ -4,8 +4,3 @@ export interface Category { categoryId: number; categoryName: CategoryName; } - -// TODO: 방비교 추후를 위해.. -// export interface CategoryScore extends Category { -// score?: number; -// }