import service from '@/utils/request'

export const list = (params) => {
    return service({
        url: '/domain/list',
        method: 'get',
        params
    })
}

// addDomain
export const addDomain = (data) => {
    return service({
        url: '/domain',
        method: 'post',
        data
    })
}

// deleteDomain
export const deleteDomain = (data) => {
    return service({
        url: '/domain',
        method: 'delete',
        data
    })
}

// updateDomain
export const updateDomain = (data) => {
    return service({
        url: '/domain',
        method: 'put',
        data
    })
}

// getDomain
export const getDomain = (id) => {
    return service({
        url: '/domain/' + id,
        method: 'get',
    })
}