데이터 초기화 화면 추가

This commit is contained in:
2025-03-26 15:31:15 +09:00
parent 8bd7e8325d
commit ffdfad1223
8 changed files with 499 additions and 4 deletions

32
src/apis/Data.js Normal file
View File

@@ -0,0 +1,32 @@
//사용자 관리 - 데이터 api 연결
import { Axios } from '../utils';
export const InitData = async (token, params) => {
try {
const res = await Axios.post('/api/v1/data/init-data', params, {
headers: { Authorization: `Bearer ${token}` },
});
return res.data;
} catch (e) {
if (e instanceof Error) {
throw new Error('InitData Error', e);
}
}
};
export const InitHistoryList = async (token, params) => {
try {
const res = await Axios.post(`/api/v1/data/init-list`, params, {
headers: { Authorization: `Bearer ${token}` },
});
return res.data;
} catch (e) {
if (e instanceof Error) {
throw new Error('InitHistoryList Error', e);
}
}
};