import { HcApi } from '../../request/index'

export default {
    async page(form) {
        return HcApi({
            url: '/api/blade-manager/appVersion/page',
            method: 'get',
            params: form,
        })
    },
    async detail(id) {
        return HcApi({
            url: '/api/blade-system/tenant/detail',
            method: 'get',
            params: {
                id,
            },
        })
    },
    async add(form) {
        return HcApi({
            url: '/api/blade-manager/appVersion/add',
            method: 'post',
            data: form,
        })
    },
    async update(form) {
        return HcApi({
            url: '/api/blade-manager/appVersion/update',
            method: 'post',
            data: form,
        })
    },
    async del(id) {
        return HcApi({
            url: '/api/blade-manager/appVersion/delete',
            method: 'post',
            params: {
                id,
            },
        })
    },
    //升级版本
    async getDetailList(form) {
        return HcApi({
            url: '/api/blade-manager/appVersionDetail/page',
            method: 'get',
            params: form,
        })
    },
    async updateDetail(form) {
        return HcApi({
            url: '/api/blade-manager/appVersionDetail/update',
            method: 'post',
            data: form,
        })
    },
    async addDetail(form) {
        return HcApi({
            url: '/api/blade-manager/appVersionDetail/add',
            method: 'post',
            data: form,
        })
    },
    async removeDetail(id) {
        return HcApi({
            url: '/api/blade-manager/appVersionDetail/delete',
            method: 'get',
            params: {
                id,
            },
        })
    },
}
