Files
FE_CPONE/test/vuex/cpone-map-setup-kelainangroupsummary/api/mapping.js
2026-04-27 10:13:31 +07:00

63 lines
1.4 KiB
JavaScript

const URL = "/one-api/mockup/cpone-map-setup-kelainangroupsummary/Setupmapkelainan/";
// https://devcpone.aplikasi.web.id/one-api/mockup/mdprice/mdprice/searchpriceheader/
export async function search(prm) {
try {
var resp = await axios.post(URL + 'getsetup', prm);
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}
export async function getdetail(prm) {
try {
var resp = await axios.post(URL + 'getdetail', prm);
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}
export async function save(prm) {
try {
var resp = await axios.post(URL + 'save', prm);
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}