refactor: axios 호출 수정
This commit is contained in:
parent
b2c22dc5a5
commit
a25538319a
@ -1,7 +1,8 @@
|
||||
import { axiosInstance } from '@/libs/axios'
|
||||
import { useAxios } from './useAxios'
|
||||
import type { CommCode } from '@/types/CommCode'
|
||||
|
||||
export function useCommCode() {
|
||||
const { axiosInstance } = useAxios()
|
||||
const getCommCode = async (headCode: string): Promise<CommCode[]> => {
|
||||
try {
|
||||
const response = await axiosInstance(null).get<CommCode[]>('/api/comm-code', { params: { headCode: headCode } })
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user