const URL = "/one-api/mockup/masterdata/";

export async function lookup(token, search,all ) {
    try {
        var resp = await axios.post(URL + 'priviledge/lookupusergroup', { token: token, search: search, all:all });
        if (resp.status != 200) {
            return {
                status: "ERR",
                message: resp.statusText
            };
        }
        let data = resp.data;
        return data;
    } catch (e) {
        return {
            status: "ERR",
            message: e.message
        };
    }
}
