Files
FE_CPONE/fo/one-fo-supervisor-v1/api/barcode.js
2026-04-27 10:13:31 +07:00

39 lines
955 B
JavaScript

const URL = "/one-api/mockup/fo/supervisor/";
export async function save(prm) {
try {
var resp = await axios.post(URL + 'supervisor/save_barcode',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 lookup(prm) {
try {
var resp = await axios.post(URL + 'supervisor/lookup_barcode',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
};
}
}