Skip to content

Commit

Permalink
✨ add endpoint for fetching numbers of page visits
Browse files Browse the repository at this point in the history
  • Loading branch information
FredrikMorstad committed Nov 26, 2023
1 parent 4b592ff commit 90b233d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/api/stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ export const logVisit = (payload: IPageVisit): Promise<{}> =>

export const getPageVisitsLastMonth = (): Promise<IPageStats[]> =>
get<IPageStats[]>('stats/most_visited_pages_last_month');

export const getPageVisit = (page: string): Promise<{ visits: number }> =>
get<{ visits: number }>('stats/get-all-page-visits', { page: page });

0 comments on commit 90b233d

Please sign in to comment.