1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-04 11:56:37 -04:00

edge functions didn't make sense for database calls

This commit is contained in:
2023-10-08 21:38:09 -04:00
parent 23844c6843
commit 179ee92f6c
11 changed files with 203 additions and 239 deletions

13
types/stats.d.ts vendored
View File

@ -1,15 +1,10 @@
import type { NoteFrontMatter } from "./note";
// a silly file, but this ensures that /api/count returns exactly what <HitCounter /> expects.
export type PageStats = {
hits: number;
};
import type { hits as Hits } from "@prisma/client";
export type DetailedPageStats = PageStats &
Pick<NoteFrontMatter, "slug" | "title" | "date"> & {
url: string;
};
export type PageStats = Pick<Hits, "hits">;
export type SiteStats = {
total: PageStats;
pages: DetailedPageStats[];
pages: Hits[];
};