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

const contextPath = '/auth'

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