import request from '@/config/axios'

// 创建
export const createComment = (data) => {
  return request.post({
    url: '/admin-api/okr/comments/create',
    data,
    isSubmitForm: true
    // headers: { 'instance-id': 1016 }
  })
}

// 分页
export const getCommentPage = (params) => {
  return request.get({
    url: '/admin-api/okr/comments/page',
    params
    // headers: { 'instance-id': 1016 }
  })
}

// 获取评论类型
export const getCommentTypeOptions = () => {
  return request.get({
    url: '/admin-api/okr/dict-data/get-by-type',
    params: { dictType: 'comment_type' }
    // headers: { 'instance-id': 1016 }
  })
}

// 点赞评论
export const likeComment = (commentId) => {
  return request.put({
    url: '/admin-api/okr/comments-likes/update',
    data: { commentId }
    // headers: { 'instance-id': 1016 }
  })
}
