// 我的音色库&形象库
import { TCorrectionItem } from '@/types/correction'
import {
  bluebookAiAgent,
} from '@/xiaolanbenlib/api/index'
import request from '@/xiaolanbenlib/module/axios.js'



// 我的纠错--列表
export const getCorrectionList = (params: {
  entId?: string|number,
  startId?: string
  pageSize?: number
}) => {
  return request.get<{
  data?: TCorrectionItem[]
  nextId: number|string,
  totalCount: number|null
} >(`${bluebookAiAgent}api/v1/my/correction/list`, {
    params: params
  })
}

// 获取指定的纠错记录详情
export const getCorrectionDetail = (id: string|number) => {
  return request.get<TCorrectionItem>(`${bluebookAiAgent}api/v1/my/correction/${id}`)
}
// 编辑保存纠错记录信息
export const editCorrection = (id: string|number, data: TCorrectionItem) => {
  return request.put(`${bluebookAiAgent}api/v1/my/correction/${id}`, data)
}

// 删除纠错记录信息
export const deleteCorrection = (id: string|number) => {
  return request.delete(`${bluebookAiAgent}api/v1/my/correction/${id}`)
}


