feat: add middleware to update "last connected at" when a request comes in

relies on a header named "X-Aniplay-Device-Id"
This commit is contained in:
2024-09-08 16:32:31 -05:00
parent 01aef0ad95
commit cc9bb8ab4d
2 changed files with 18 additions and 0 deletions

View File

@@ -1,8 +1,12 @@
import { swaggerUI } from "@hono/swagger-ui";
import { OpenAPIHono } from "@hono/zod-openapi";
import { maybeUpdateLastConnectedAt } from "~/controllers/maybeUpdateLastConnectedAt";
const app = new OpenAPIHono();
app.use(maybeUpdateLastConnectedAt);
app.route(
"/",
await import("~/controllers/health-check").then(