import type { AxiosResponse } from 'axios'
import http from '@/utils/http'
import type { Result, FrameUserInfo } from '@cacp/ui'
import config from '@/config'
const contextPath = '/auth'

export async function getFrameUser(): Promise<Result<FrameUserInfo>> {
  const res: AxiosResponse<Result<FrameUserInfo>> = await http.get(`${config.FRAME_API}${contextPath}/get-frame-user`)
  return res.data
}
