const URL = "/one-api/mockup/masterdata/one-md-summary-fisik/"; export async function search(prm) { try { var resp = await axios.post(URL + "summaryfisik/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 searchkelainan(token, prm) { try { var resp = await axios.post(URL + "summaryfisik/searchkelainan", { token: token, 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 getfitness(token) { try { var resp = await axios.post(URL + "summaryfisik/getfitness", { 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 save(prm) { try { var resp = await axios.post(URL + "summaryfisik/addnewsummaryfisik", 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 update(prm) { try { var resp = await axios.post(URL + "summaryfisik/updatesummaryfisik", 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 + "summaryfisik/deletesummaryfisik", { 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, }; } }