import axios from 'axios' /** * 하수관로 API URL */ const API_URL = process.env.NEXT_PUBLIC_SEWERAGE_API_URL const PPLINES_URL = `${API_URL}/v1/pplines` const PAGE_NO = 1 const PAGE_SIZE = 20 export type PplineProps = { ftreSmbol: string swageLnkgPplPk: string pbadmsEmd: string sttyEmd: string } /** * 하수관로 서비스 */ export const pplinesService = { getPplines: (size: number = PAGE_SIZE, page: number = PAGE_NO) => { return axios.get(`${PPLINES_URL}`) }, getPpline: (swageLnkgPplPk: string) => { return axios.get(`${PPLINES_URL}/${swageLnkgPplPk}`) }, savePpline: (swageLnkgPplPk: string) => { return axios.post(`${PPLINES_URL}`) }, updatePpline: (swageLnkgPplPk: string) => { return axios.put(`${PPLINES_URL}/${swageLnkgPplPk}`) }, removePpline: (swageLnkgPplPk: string) => { return axios.delete(`${PPLINES_URL}/${swageLnkgPplPk}`) } }