import request from '../../utils/request'

export function getUserInfo() {
  return request({
    url: '/settings/getUserInfo',
    method: 'get',
  })
}

export function changePassword(data) {
  return request({
    url: '/settings/changePassword',
    method: 'post',
    data,
  })
}

export function getMyAdvices() {
  return request({
    url: '/settings/getMyAdvices',
    method: 'get',
  })
}

export function submitNewAdvice(data) {
  return request({
    url: '/settings/submitNewAdvice',
    method: 'post',
    data,
  })
}

export function checkAdvice(id) {
  return request({
    url: '/settings/checkAdvice',
    method: 'get',
    params: { id },
  })
}

export function updateReply(data) {
  return request({
    url: '/settings/replyAdvice',
    method: 'post',
    data,
  })
}

export function dismissUserBadge(id) {
  return request({
    url: '/settings/dismissUserBadge',
    method: 'get',
    params: { id },
  })
}
