diff --git a/src/apis/OpstBizService.js b/src/apis/OpstBizService.js index a268b81..0775cef 100644 --- a/src/apis/OpstBizService.js +++ b/src/apis/OpstBizService.js @@ -8,11 +8,18 @@ import { GET_PUBLIC_BOARD, GET_CMM_CODE_LIST, SAVE_PUBLIC_BOARD, - DELETE_PUBLIC_BOARD + DELETE_PUBLIC_BOARD, + GET_FILE_DOWNLOAD } from 'commons/ApiUrl'; import axios from 'utils/axios'; class OpstBizService { + // eslint-disable-next-line no-return-await + getComboCodeList = async (params) => await axios.get(GET_CMM_CODE_LIST, { params }); + + // eslint-disable-next-line no-return-await + fileDownload = async (id) => await axios.get(GET_FILE_DOWNLOAD + id); + setRowId = (params, idx) => { if (params && params.page && params.size) return params.page * params.size + idx + 1; return idx + 1; @@ -91,9 +98,6 @@ class OpstBizService { return res; }; - // eslint-disable-next-line no-return-await - getComboCodeList = async (params) => await axios.get(GET_CMM_CODE_LIST, { params }); - // getComboCodeList(params) { // return reqApi.get(CMM_CODE_LIST_URL, { params }); // .then(r => console.log(r)) diff --git a/src/commons/ApiUrl.js b/src/commons/ApiUrl.js index 6844b8f..b3de10a 100644 --- a/src/commons/ApiUrl.js +++ b/src/commons/ApiUrl.js @@ -2,6 +2,7 @@ // console.log(process.env.NODE_ENV) export const LOGIN_URL = '/api/v1/ctgy/account/login'; export const GET_CMM_CODE_LIST = '/api/v1/biz/cmm/combo'; +export const GET_FILE_DOWNLOAD = '/api/v1/ctgy/file/download/'; // 공지사항 export const GET_PUBLIC_BOARD_LIST = '/api/v1/ctgy/pboard'; diff --git a/src/views/biz/board/PublicBoardForm.jsx b/src/views/biz/board/PublicBoardForm.jsx index f59fbd8..50eed20 100644 --- a/src/views/biz/board/PublicBoardForm.jsx +++ b/src/views/biz/board/PublicBoardForm.jsx @@ -117,7 +117,7 @@ const PublicBoardForm = (props) => { }; const handleFileDownload = (e) => { - alert('download'); + opstBizService.fileDownload(inCode); }; return ( <>