feat(apihits): so i can see if what end points are being used and when and how often
This commit is contained in:
@@ -5,6 +5,7 @@ import { tryCatch } from "../../../../globalUtils/tryCatch.js";
|
||||
import { labelingProcess } from "../../controller/labeling/labelProcess.js";
|
||||
import { bookInLabel } from "../../controller/labeling/bookIn.js";
|
||||
import { createSSCC } from "../../../../globalUtils/createSSCC.js";
|
||||
import { apiHit } from "../../../../globalUtils/apiHits.js";
|
||||
|
||||
const app = new OpenAPIHono({ strict: false });
|
||||
|
||||
@@ -21,6 +22,7 @@ app.openapi(
|
||||
const { data: bodyData, error: bodyError } = await tryCatch(
|
||||
c.req.json()
|
||||
);
|
||||
apiHit(c, { endpoint: "/bookin", lastBody: bodyData });
|
||||
|
||||
if (bodyError) {
|
||||
return c.json({
|
||||
|
||||
Reference in New Issue
Block a user