feat(apihits): so i can see if what end points are being used and when and how often
This commit is contained in:
@@ -3,6 +3,7 @@ import { createRoute, OpenAPIHono, z } from "@hono/zod-openapi";
|
||||
import { responses } from "../../../globalUtils/routeDefs/responses.js";
|
||||
|
||||
import runTiImport from "../controller/notifications/tiIntergration.js";
|
||||
import { apiHit } from "../../../globalUtils/apiHits.js";
|
||||
|
||||
const app = new OpenAPIHono({ strict: false });
|
||||
|
||||
@@ -16,6 +17,7 @@ app.openapi(
|
||||
responses: responses(),
|
||||
}),
|
||||
async (c) => {
|
||||
apiHit(c, { endpoint: "/tiTrigger" });
|
||||
const tiImport = await runTiImport();
|
||||
return c.json({
|
||||
success: tiImport?.success,
|
||||
|
||||
Reference in New Issue
Block a user