Added Util endpoint
MODIFY
src/server/rest/router/GlobalRouter.ts
src/server/rest/router/GlobalRouter.ts
@@ -3,6 +3,7 @@ import { authRouter } from './auth/AuthRouter';
import express from 'express';
import { swaggerRouter } from './doc/SwaggerRouter';
import { tenantRouter } from './api/TenantRouter';
+import { utilRouter } from './util/UtilRouter';
export const globalRouter = express.Router();
@@ -12,6 +13,8 @@ globalRouter.use('/v1/api', AuthService.authenticate(), tenantRouter);
// Auth
globalRouter.use('/v1/auth', authRouter);
+// Util
+globalRouter.use('/v1/util', utilRouter);
+
// Docs
globalRouter.use('/v1/docs', swaggerRouter);
-

ADD
src/server/rest/router/util/UtilRouter.ts
+import express, { NextFunction, Request, Response } from 'express';
+
+import { StatusCodes } from 'http-status-codes';
+
+export const utilRouter = express.Router();
+
+utilRouter.get('/ping', async (req: Request, res: Response, next: NextFunction) => {
+ res.sendStatus(StatusCodes.OK);
+});
+

Added Util endpoint