const URL = "/one-api/mockup/masterdata/qontakconfig/"; export async function getlatestdata(token) { try { var resp = await axios.post(URL + 'getlatestdata', { 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 update(prm) { try { var resp = await axios.post(URL + 'updateconfig', 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 save(prm) { try { var resp = await axios.post(URL + 'addnewconfig', 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 }; } }