From e36281f212f075b84d396dfc3bf2a245c8402a9f Mon Sep 17 00:00:00 2001 From: Udit <25996904+uditdc@users.noreply.github.com> Date: Tue, 17 Dec 2024 20:09:58 +0530 Subject: [PATCH] Patch authenticator and rate limit middleware --- packages/api/src/routes/index.ts | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/packages/api/src/routes/index.ts b/packages/api/src/routes/index.ts index 0f8e24ae..b7026ca8 100644 --- a/packages/api/src/routes/index.ts +++ b/packages/api/src/routes/index.ts @@ -10,7 +10,6 @@ import auxiliaryRoutes from './auxiliary/auxiliaryRoutes' import rewardRoutes from './rewards/rewardRoutes' import eventRoutes from './events/eventsRoutes' import authRoutes from './auth/authRoutes' -import { authenticator, rateLimiter } from '../utils/authMiddleware' const apiRouter = express.Router() @@ -23,16 +22,16 @@ apiRouter.get('/version', (_, res) => ) // Remaining routes -apiRouter.use('/avs', authenticator, rateLimiter, avsRoutes) -apiRouter.use('/strategies', authenticator, rateLimiter, strategiesRoutes) -apiRouter.use('/operators', authenticator, rateLimiter, operatorRoutes) -apiRouter.use('/stakers', authenticator, rateLimiter, stakerRoutes) -apiRouter.use('/metrics', authenticator, rateLimiter, metricRoutes) -apiRouter.use('/withdrawals', authenticator, rateLimiter, withdrawalRoutes) -apiRouter.use('/deposits', authenticator, rateLimiter, depositRoutes) -apiRouter.use('/aux', authenticator, rateLimiter, auxiliaryRoutes) -apiRouter.use('/rewards', authenticator, rateLimiter, rewardRoutes) -apiRouter.use('/events', authenticator, rateLimiter, eventRoutes) -apiRouter.use('/auth', authenticator, rateLimiter, authRoutes) +apiRouter.use('/avs', avsRoutes) +apiRouter.use('/strategies', strategiesRoutes) +apiRouter.use('/operators', operatorRoutes) +apiRouter.use('/stakers', stakerRoutes) +apiRouter.use('/metrics', metricRoutes) +apiRouter.use('/withdrawals', withdrawalRoutes) +apiRouter.use('/deposits', depositRoutes) +apiRouter.use('/aux', auxiliaryRoutes) +apiRouter.use('/rewards', rewardRoutes) +apiRouter.use('/events', eventRoutes) +apiRouter.use('/auth', authRoutes) export default apiRouter