fix(app): emit.maxlistener issue
All checks were successful
Build and Push LST Docker Image / docker (push) Successful in 1m27s
All checks were successful
Build and Push LST Docker Image / docker (push) Successful in 1m27s
BREAKING CHANGE: moved teh middleware to call the api hits to the main app and removed from everywhere else closes #18
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { Express } from "express";
|
||||
import { requireAuth } from "../middleware/auth.middleware.js";
|
||||
import { routeHitMiddleware } from "../middleware/routeHit.middleware.js";
|
||||
|
||||
import restart from "./tcpRestart.route.js";
|
||||
import start from "./tcpStart.route.js";
|
||||
import stop from "./tcpStop.route.js";
|
||||
@@ -8,12 +8,12 @@ import stop from "./tcpStop.route.js";
|
||||
export const setupTCPRoutes = (baseUrl: string, app: Express) => {
|
||||
//stats will be like this as we dont need to change this
|
||||
|
||||
app.use(`${baseUrl}/api/tcp/start`, requireAuth, routeHitMiddleware, start);
|
||||
app.use(`${baseUrl}/api/tcp/stop`, requireAuth, routeHitMiddleware, stop);
|
||||
app.use(`${baseUrl}/api/tcp/start`, requireAuth, start);
|
||||
app.use(`${baseUrl}/api/tcp/stop`, requireAuth, stop);
|
||||
app.use(
|
||||
`${baseUrl}/api/tcp/restart`,
|
||||
requireAuth,
|
||||
routeHitMiddleware,
|
||||
|
||||
restart,
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user