import { api } from '@/core/services/api'
import type { PublicMemberProfileApiResponse } from '../types/public-member-profile.types'

export async function getPublicMemberProfile(
  token: string,
): Promise<PublicMemberProfileApiResponse> {
  const { data } = await api.get<PublicMemberProfileApiResponse>(
    `/v1/public/members/${encodeURIComponent(token)}`,
  )

  return data
}
