diff --git a/src/api/stats.ts b/src/api/stats.ts index 0b18f384..51a483a0 100644 --- a/src/api/stats.ts +++ b/src/api/stats.ts @@ -20,3 +20,6 @@ export const logVisit = (payload: IPageVisit): Promise<{}> => export const getPageVisitsLastMonth = (): Promise => get('stats/most_visited_pages_last_month'); + +export const getPageVisit = (page: string): Promise<{ visits: number }> => + get<{ visits: number }>('stats/get-all-page-visits', { page: page });