refactor: 패키지 정리

main
minuk926 3 years ago
parent 6be8acd070
commit 65aef196ea

@ -1,4 +1,4 @@
import { BOARD_LIST_URL, PUBLIC_BOARD_LIST_URL, SIMSA_DETAILS_LIST_URL, SIMSA_LIST_URL } from 'commons/ApiUrl'; import { BOARD_LIST_URL, PUBLIC_BOARD_LIST_URL, PARKING_SIMSA_DETAILS_LIST_URL, PARKING_SIMSA_LIST_URL } from 'commons/ApiUrl';
import axios from 'utils/axios'; import axios from 'utils/axios';
class OpstBizService { class OpstBizService {
@ -36,7 +36,7 @@ class OpstBizService {
// eslint-disable-next-line no-return-await // eslint-disable-next-line no-return-await
getSimsa680GroupList = async (params) => { getSimsa680GroupList = async (params) => {
const res = await axios.get(SIMSA_LIST_URL, { params }); const res = await axios.get(PARKING_SIMSA_LIST_URL, { params });
if (res.success) { if (res.success) {
res.data = res.data.map((d, idx) => ({ ...d, rowId: this.setRowId(params, idx) })); res.data = res.data.map((d, idx) => ({ ...d, rowId: this.setRowId(params, idx) }));
return res; return res;
@ -45,7 +45,7 @@ class OpstBizService {
}; };
getSimsa680DetailList = async (params) => { getSimsa680DetailList = async (params) => {
const res = await axios.get(SIMSA_DETAILS_LIST_URL, { params }); const res = await axios.get(PARKING_SIMSA_DETAILS_LIST_URL, { params });
if (res.success) { if (res.success) {
res.data = res.data.map((d, idx) => ({ ...d, rowId: this.setRowId(params, idx) })); res.data = res.data.map((d, idx) => ({ ...d, rowId: this.setRowId(params, idx) }));
return res; return res;

@ -10,5 +10,5 @@ export const PUBLIC_BOARD_LIST_URL = '/api/v1/ctgy/pboard';
export const BOARD_LIST_URL = '/api/v1/ctgy/board'; export const BOARD_LIST_URL = '/api/v1/ctgy/board';
// 주정차 의견 진술 // 주정차 의견 진술
export const SIMSA_LIST_URL = '/api/v1/ctgy/simsa/review'; export const PARKING_SIMSA_LIST_URL = '/api/v1/ctgy/parking';
export const SIMSA_DETAILS_LIST_URL = '/api/v1/ctgy/simsa/details'; export const PARKING_SIMSA_DETAILS_LIST_URL = '/api/v1/ctgy/parking/details';

@ -62,7 +62,7 @@ export const JWTProvider = ({ children }) => {
// TODO: verifyToken ?? // TODO: verifyToken ??
if (accessToken && verifyToken(accessToken)) { if (accessToken && verifyToken(accessToken)) {
setLocalStorage(ACCESS_TOKEN_NAME, accessToken); setLocalStorage(ACCESS_TOKEN_NAME, accessToken);
const response = await axios.get('/api/v1/ctgy/user'); const response = await axios.get('/api/v1/ctgy/user/info');
console.log(response); console.log(response);
// TODO : 적용 필요 // TODO : 적용 필요
const { userid, email, name } = response.data; const { userid, email, name } = response.data;

@ -21,7 +21,7 @@ import MuiGridList from 'views/form/MuiGridList';
import opstBizService from 'apis/OpstBizService'; import opstBizService from 'apis/OpstBizService';
import { useTheme } from '@mui/material/styles'; import { useTheme } from '@mui/material/styles';
import xitCmm from 'commons/XitCmm'; import xitCmm from 'commons/XitCmm';
import { SIMSA_DETAILS_LIST_URL } from '../../../commons/ApiUrl'; import { PARKING_SIMSA_DETAILS_LIST_URL } from '../../../commons/ApiUrl';
import ModalDetails from './ModalDetails'; import ModalDetails from './ModalDetails';
import MainRoutes from '../../../routes/MainRoutes'; import MainRoutes from '../../../routes/MainRoutes';
import { useNavigate } from 'react-router-dom'; import { useNavigate } from 'react-router-dom';

Loading…
Cancel
Save