import http from "./config";

//创建外链接口
export const createExternalChain = (obj) => http.post('/link/createLinks', obj, {
  headers: {
    'token': '123'
  }
})

//外链信息删除接口
export const deleteLink = (obj) => http.post('/link/deleteLink', { params: obj }, {
  headers: {
    'token': '123'
  }
})

//获取外链详细信息接口
export const getLink = (obj) => http.post('/link/getOne', obj,{
  headers: {
    'token': '123',
    'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
  }
})

// 更新外链数据
export const updateLinks = (obj) => http.post('/link/updateLinks', obj, {
  headers: {
    'token': '123'
  }
})

//修改为必修的接口
export const updateToCompulsory = (obj) => http.post('/link/updateToCompulsory', { params: obj }, {
  headers: {
    'token': '123'
  }
})

//修改为选修的接口
export const updateToElective = (obj) => http.post('/link/updateToElective', { params: obj }, {
  headers: {
    'token': '123'
  }
})