const URL = "/one-api/homeservice/"; export async function save(prm) { try { var resp = await axios.post(URL + 'upload/addnewupload', 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 xdelete(token,id) { try { var resp = await axios.post(URL + 'upload/deleteupload', { id: id ,token:token}); 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 searchakun(prm) { try { var resp = await axios.post(URL + 'upload/searchakun',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 selectpaymenttype(token) { try { var resp = await axios.post(URL + 'upload/selectpaymenttype',{token:token}); 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 searchpaymenttype(prm) { try { var resp = await axios.post(URL + 'upload/searchpaymenttype',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 searchdistrict(prm) { try { var resp = await axios.post(URL + 'upload/searchdistrict',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 searchkelurahan(prm) { try { var resp = await axios.post(URL + 'upload/searchkelurahan',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 searchcompany(prm) { try { var resp = await axios.post(URL + 'upload/searchcompany',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 searchmou(prm) { try { var resp = await axios.post(URL + 'upload/searchmou',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 searchdoctor(prm) { try { var resp = await axios.post(URL + 'upload/searchdoctor',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 lookupbyname(prm) { try { var resp = await axios.post(URL + 'upload/lookupuploadbyname', 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 selectaddressdoctor(prm) { try { var resp = await axios.post(URL + 'upload/selectaddressdoctor',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 }; } }