chore: update to latest astro ink version

This commit is contained in:
Timothy DeHerrera
2024-07-06 14:41:28 -06:00
parent 97aa45c32e
commit e4620874f9
84 changed files with 13949 additions and 4620 deletions

View File

@@ -0,0 +1,19 @@
import type { APIRoute } from "astro";
// import { getViewsBySlug } from "src/utils/views/turso";
// import { getViewsBySlug } from "src/utils/views/ioredis";
import { getViewsBySlug } from "src/utils/views/in-memory";
// In development/HMR, you can accidentally make this call numerous times and exceed your quota...
// thus, the in-memory version of `getViewsBySlug` is used
// When deploying, and you have either `ioredis` or `turso` configured with your cloned version -
// please uncomment the respective line
export const GET: APIRoute = async ({ params, request }) => {
return new Response(
JSON.stringify({
views: params.slug ? await getViewsBySlug(params.slug) : 0,
}),
);
};