import request from "@/utils/request";
const list=(data)=>{
    return request({
        url: `/connections`,
        method: "get",
        params:data
      });
}

const add=(data)=>{
    return request({
        url: `/connections`,
        method: "post",
        data:data
      });
}
const deleteConnect=(id)=>{
    return request({
        url: `/connections/${id}`,
        method: "delete"
      });
}

const detail=(id)=>{
    return request({
        url: `/connections/${id}`,
        method: "get"
      });
}


const updatAll=(id,data)=>{
    return request({
        url: `/connections/${id}/all`,
        method: "put",
        data:data
      });
}

const updateInfo=(id,data)=>{
    return request({
        url: `/connections/${id}/info`,
        method: "put",
        data:data
      });
}

export default {
    list,
    add,
    deleteConnect,
    detail,
    updatAll,
    updateInfo
}