import { request } from '@umijs/max';

export async function gunPage(body) {
    return request('/admin/device/gun/page', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8',
        },
        data: body || {},
    });
}

export async function gunAdd(body) {
    return request('/admin/device/gun/add', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8',
        },
        data: body || {},
    });
}


export async function gunUpdate(body) {
    return request('/admin/device/gun/update', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8',
        },
        data: body || {},
    });
}

export async function deleteBatchByIds(body) {
    return request('/admin/device/gun/deleteBatchByIds', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8',
        },
        data: body || {},
    });
}

export async function getInfo(params) {
    return request('/admin/device/gun/get', {
        method: 'GET',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8',
        },
        params
    });
}


export async function getEnable(params) {
    return request('/admin/device/gun/enable', {
        method: 'GET',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8',
        },
        params
    });
}
