const URL = "/one-api/mockup/report/"; export async function search(prm) { try { var resp = await axios.post(URL + 'trendanalysisbypx/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 search_test(token, query) { try { var resp = await axios.post(URL + 'trendanalysisbypx/search_test', { token:token, search: query }); 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 search_mou(token, test, query) { try { var resp = await axios.post(URL + 'trendanalysisbypx/search_mou', { token:token, test_id: test, search: query }); 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 savetutup(prm) { try { var resp = await axios.post(URL + 'trendanalysisbypx/savetutup', 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 }; } }