Skip to content

Commit 1152396

Browse files
committed
🐛 [fix] : 1차 카테고리 추가, 2차 카테고리 수정 400 에러 발생 수정
1 parent 9e59dd3 commit 1152396

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/components/task-management/CategoryAdd.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,9 @@ const handleSubmit = async () => {
122122
123123
const categoryId = route.params.id
124124
if (categoryId) {
125+
const newForm: CategoryForm = { ...categoryForm.value, mainCategoryId: undefined }
125126
const patchUrl = `/api/managements/categories/${categoryId}`
126-
await axiosInstance.patch(patchUrl, categoryForm.value)
127+
await axiosInstance.patch(patchUrl, newForm)
127128
} else {
128129
const postUrl =
129130
categoryStep === '1' ? '/api/managements/main-category' : '/api/managements/sub-category'

src/constants/admin.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ import type { RoleTypes, RoleTypesEnum, UserRegistrationProps } from '@/types/ad
3737

3838
export const CATEGORY_FORM: CategoryForm = {
3939
name: '',
40-
code: '',
41-
descriptionExample: ''
40+
code: ''
4241
}
4342

4443
export const INITIAL_USER_REGISTRATION: UserRegistrationProps = {

0 commit comments

Comments
 (0)