const URL = "/one-api/mockup/masterdata/one-md-location/location/"; export async function lookup(prm) { try { var resp = await axios.post(URL + "search", prm); if (resp.status != 200) { return { status: "ERR", }; } let data = resp.data; return data; } catch (e) { return { status: "ERR", message: e.message, }; } } export async function station(prm) { try { var resp = await axios.post(URL + "get_station", prm); if (resp.status != 200) { return { status: "ERR", }; } let data = resp.data; return data; } catch (e) { return { status: "ERR", message: e.message, }; } } export async function additem(prm) { try { var resp = await axios.post(URL + "add", prm); if (resp.status != 200) { return { status: "ERR", }; } let data = resp.data; return data; } catch (e) { return { status: "ERR", message: e.message, }; } } export async function update(prm) { try { var resp = await axios.post(URL + "edit", prm); if (resp.status != 200) { return { status: "ERR", }; } let data = resp.data; return data; } catch (e) { return { status: "ERR", message: e.message, }; } } export async function xdelete(prm) { try { var resp = await axios.post(URL + "delete", prm); if (resp.status != 200) { return { status: "ERR", }; } let data = resp.data; return data; } catch (e) { return { status: "ERR", message: e.message, }; } }