refactor(ocme): added in apihits to getinfo
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import {createRoute, OpenAPIHono, z} from "@hono/zod-openapi";
|
import {createRoute, OpenAPIHono, z} from "@hono/zod-openapi";
|
||||||
import {getInfo} from "../controller/getInfo.js";
|
import {getInfo} from "../controller/getInfo.js";
|
||||||
|
import {apiHit} from "../../../globalUtils/apiHits.js";
|
||||||
|
|
||||||
const app = new OpenAPIHono();
|
const app = new OpenAPIHono();
|
||||||
|
|
||||||
@@ -69,6 +70,7 @@ app.openapi(
|
|||||||
}),
|
}),
|
||||||
async (c) => {
|
async (c) => {
|
||||||
// make sure we have a vaid user being accessed thats really logged in
|
// make sure we have a vaid user being accessed thats really logged in
|
||||||
|
apiHit(c, {endpoint: "api/auth/register"});
|
||||||
try {
|
try {
|
||||||
return c.json({success: true, message: "Ocme Info", data: await getInfo()}, 200);
|
return c.json({success: true, message: "Ocme Info", data: await getInfo()}, 200);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user