23 lines
535 B
TypeScript
23 lines
535 B
TypeScript
import { apiConfig } from "../api-config";
|
|
|
|
export async function apiMasterBidangBisnis() {
|
|
try {
|
|
const response = await apiConfig.get(`/master/bidang-bisnis`);
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
export async function apiMasterSubBidangBisnis({ id }: { id?: string }) {
|
|
try {
|
|
const selectBidangId = id ? `/${id}` : "";
|
|
const response = await apiConfig.get(
|
|
`/master/sub-bidang-bisnis${selectBidangId}`
|
|
);
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|