import type { AxiosResponse } from 'axios'
import request from '@/utils/request'
import type { Result, UserAuthorityInfo } from '@cacp/ui'

//const contextPath = '/cacp-authority'
//测试环境
const contextPath = '/auth'


export async function getUserAuthority(): Promise<Result<UserAuthorityInfo>> {
  const res: AxiosResponse<Result<UserAuthorityInfo>> = await request.get(`${contextPath}/get-user-authority`)
  return res.data
}
