1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-19 13:15:32 -04:00

only reveal a db record via /api/hits if it matches a real page

This commit is contained in:
2022-07-06 11:49:41 -04:00
parent 8d47958473
commit 155c6cacd9
9 changed files with 82 additions and 76 deletions

12
types/stats.d.ts vendored
View File

@@ -1,13 +1,13 @@
import type { NoteFrontMatter } from "./note";
export type PageStats = {
hits: number;
};
export type DetailedPageStats = PageStats & {
slug: string;
title?: string;
url?: string;
date?: string;
};
export type DetailedPageStats = PageStats &
Pick<NoteFrontMatter, "slug" | "title" | "date"> & {
url: string;
};
export type SiteStats = {
total: PageStats;