[as] feat: 결재선 관리 페이지 구현
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { client } from "@/shared/api/client";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
|
||||
import type { Code, CodeService } from "../model/code-interface";
|
||||
|
||||
async function getList(upCd: string): Promise<Code[]> {
|
||||
const response = await client.get<Code[]>(`${ENDPOINT.CMS_SERVICE.CODE}/${upCd}`);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
async function getListByUseYn(upCd: string, useYn: string): Promise<Code[]> {
|
||||
const response = await client.get<Code[]>(
|
||||
`${ENDPOINT.CMS_SERVICE.CODE}/${upCd}/${useYn}`,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
async function getCodeName(upCd: string, lwpoCd: string): Promise<string> {
|
||||
const response = await client.get<string>(
|
||||
`${ENDPOINT.CMS_SERVICE.CODE}/${upCd}/lwpoCd/${lwpoCd}`,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
export const codeService = {
|
||||
getList,
|
||||
getListByUseYn,
|
||||
getCodeName,
|
||||
} satisfies CodeService;
|
||||
Reference in New Issue
Block a user