// http://devkedungdororaya.aplikasi.web.id/one-api/v1/courier/mdcourier/search const URL = "/one-api/v1/courier/mdcourier/"; export async function search(prm) { try { var resp = await axios.post(URL + 'search', 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 add(prm) { try { var resp = await axios.post(URL + 'add', 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 deleteData(prm) { try { var resp = await axios.post(URL + 'delete', 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 }; } }