diff --git a/src/components/Main/Setting/index.tsx b/src/components/Main/Setting/index.tsx index 7197eaeb..7a2d9323 100644 --- a/src/components/Main/Setting/index.tsx +++ b/src/components/Main/Setting/index.tsx @@ -85,9 +85,7 @@ export const SettingComponent = React.forwardRef( } }; - const changeAdminAction = (userName: string, userId: number) => { - toastColorMessage(userName + '님이 방장이 되었습니다.'); - toastColorMessage(userId + '아이디 회원에게 방장 권한을 넘겼습니다.'); + const changeAdminAction = (userId: number) => { onClose(); const formData = new FormData(); const spaceUserDTO = { @@ -96,13 +94,12 @@ export const SettingComponent = React.forwardRef( isAdmin: true, }; formData.append('spaceUserDTO', JSON.stringify(spaceUserDTO)); - formData.append('image', JSON.stringify(null)); userUpdateAction(formData); }; const changeAdminHandler = (userName: string, userId: number) => { confirmModalOpen({ - AsyncAction: () => changeAdminAction(userName, userId), + AsyncAction: () => changeAdminAction(userId), isPositiveModal: true, descriptionMessage: `방장 권한을 주면 ${userList[0].userName}님은 \n스페이스 관리 및 인원 관리를 할 수 없게됩니다.`, titleMessage: userName + ' 님에게 방장 권한을 주시겠습니까?', diff --git a/src/constants/api.ts b/src/constants/api.ts index 4d3bd0bf..2c739fff 100644 --- a/src/constants/api.ts +++ b/src/constants/api.ts @@ -9,7 +9,7 @@ export const BASE_URL = import.meta.env.VITE_BASE_URL; export const AXIOS_BASE_URL = import.meta.env.VITE_BACK_URL; -export const END_POINTS = { +export const END_POINTS = { USER: '/user', TOKEN: '/user/refreshToken', MY_POST_LIST: `/user/mypost`,