diff --git a/apps/sn/app/(with-base-layout)/ii/irsetting/page.tsx b/apps/sn/app/(with-base-layout)/ii/irsetting/page.tsx index a3c012b26..d9d49d4c7 100644 --- a/apps/sn/app/(with-base-layout)/ii/irsetting/page.tsx +++ b/apps/sn/app/(with-base-layout)/ii/irsetting/page.tsx @@ -54,7 +54,7 @@ const IrSetting = () => { const [swtrmtFcltNm, setSwtrmtFcltNm] = useState(''); // 하수처리시설명 상태 const [file, setFile] = useState(null); - const handleFileChange = (e) => { + const handleFileChange = (e: any) => { setFile(e.target.files[0]); }; diff --git a/apps/sn/app/components/lib/api/index.ts b/apps/sn/app/components/lib/api/index.ts index e5df594d7..f70b0f3c0 100644 --- a/apps/sn/app/components/lib/api/index.ts +++ b/apps/sn/app/components/lib/api/index.ts @@ -3,7 +3,7 @@ import axios from 'axios'; const BASE_URL = process.env.NEXT_PUBLIC_SEWERAGE_API_URL || ''; -export const getData = async (url: string, data?: object): Promise => { +export const getData = async (url: string): Promise => { const res = await fetch(url.startsWith('/') ? `${url}` : `${BASE_URL}/${url}`, { method: "GET", }); @@ -49,14 +49,8 @@ export const postData = async (url: string, data: object): Promise => { }; export const postMutiPart = async (url: string, data: FormData): Promise => { - const options: RequestInit = { - method: "POST", - body: data, - }; - //const res = await fetch(`${BASE_URL}/${url}`, options); const res = await axios.post(`${BASE_URL}/${url}`, data); - const resData = await res.json(); - return resData; + return res.data; }; export const putData = async (url: string, data: object): Promise => {