From 3f97239d88d9f9f91820f02dacce87f479b46202 Mon Sep 17 00:00:00 2001 From: changkyu choi Date: Wed, 11 Dec 2024 18:10:56 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B0=B0=EC=B9=98=20API=20=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/common/useMasterController.js | 40 +++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/hooks/common/useMasterController.js b/src/hooks/common/useMasterController.js index d0cac892..ced80244 100644 --- a/src/hooks/common/useMasterController.js +++ b/src/hooks/common/useMasterController.js @@ -1,4 +1,5 @@ import { useAxios } from '@/hooks/useAxios' +import axios from 'axios' /** * 마스터 컨트롤러 훅 @@ -30,8 +31,47 @@ export function useMasterController() { }) } + /** + * 가대 목록 조회 + * @param + * @returns + */ + const getTrestleList = async (params) => { + return await get({ url: `/api/v1/master/getTrestleList/${params}` }).then((res) => { + console.log('🚀🚀 ~ getTrestleList ~ res:', res) + return res + }) + } + + /** + * 모듈 시공법 목록 조회 + * @param + * @returns + */ + const getConstructionList = async (params) => { + return await get({ url: `/api/v1/master/getConstructionList/${params}` }).then((res) => { + console.log('🚀🚀 ~ getConstructionList ~ res:', res) + return res + }) + } + + /** + * 가대 상세 조회 + * @param + * @returns + */ + const getTrestleDetailList = async (params) => { + return await get({ url: `/api/v1/master/getTrestleDetailList/${params}` }).then((res) => { + console.log('🚀🚀 ~ getTrestleDetailList ~ res:', res) + return res + }) + } + return { getRoofMaterialList, getModuleTypeItemList, + getTrestleList, + getConstructionList, + getTrestleDetailList, } }