Extract admin dashboard from ghabilee-frontend2 into a dedicated Next.js app for backoffice.ghabilee.ir (no SEO indexing / Clarity).
26 lines
833 B
TypeScript
26 lines
833 B
TypeScript
import axiosInstance from '@/config/axios'
|
|
import { unwrapApiPayload } from '@/helpers/listResponse'
|
|
|
|
export interface PublicOrganizerSummary {
|
|
id: string
|
|
firstName: string
|
|
lastName: string
|
|
avatarUrl: string | null
|
|
gender: 'male' | 'female' | 'other' | null
|
|
bio?: string | null
|
|
cityName?: string | null
|
|
isVerified?: boolean
|
|
memberSince?: string
|
|
followersCount: number
|
|
pastEventsCount: number
|
|
totalGuestsCount?: number
|
|
contactLinks?: { channel: string; label: string; url: string }[]
|
|
}
|
|
|
|
/** `GET /users/public/:id` — public host card on event detail / profiles. */
|
|
export async function fetchPublicOrganizer(organizerId: string): Promise<PublicOrganizerSummary> {
|
|
const response = await axiosInstance.get(`users/public/${organizerId}`)
|
|
|
|
return unwrapApiPayload<PublicOrganizerSummary>(response.data)
|
|
}
|