diff --git a/deno.json b/deno.json index f6e9743..6ba14d7 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@moonlight-protocol/provider-platform", - "version": "0.4.0", + "version": "0.4.1", "license": "MIT", "exports": "./src/main.ts", "tasks": { diff --git a/src/http/v1/dashboard/routes.ts b/src/http/v1/dashboard/routes.ts index a4924a9..ddb8367 100644 --- a/src/http/v1/dashboard/routes.ts +++ b/src/http/v1/dashboard/routes.ts @@ -15,13 +15,11 @@ const dashboardRouter = new Router(); dashboardRouter.post("/dashboard/auth/challenge", lowRateLimitMiddleware, postChallengeHandler); dashboardRouter.post("/dashboard/auth/verify", lowRateLimitMiddleware, postVerifyHandler); -// --- Protected endpoints --- -dashboardRouter.use("/dashboard", jwtMiddleware); - -dashboardRouter.get("/dashboard/channels", getChannelsHandler); -dashboardRouter.get("/dashboard/mempool", getMempoolHandler); -dashboardRouter.get("/dashboard/operations", getOperationsHandler); -dashboardRouter.get("/dashboard/treasury", getTreasuryHandler); -dashboardRouter.get("/dashboard/audit-export", getAuditExportHandler); +// --- Protected endpoints (JWT checked inline per-route) --- +dashboardRouter.get("/dashboard/channels", jwtMiddleware, getChannelsHandler); +dashboardRouter.get("/dashboard/mempool", jwtMiddleware, getMempoolHandler); +dashboardRouter.get("/dashboard/operations", jwtMiddleware, getOperationsHandler); +dashboardRouter.get("/dashboard/treasury", jwtMiddleware, getTreasuryHandler); +dashboardRouter.get("/dashboard/audit-export", jwtMiddleware, getAuditExportHandler); export default dashboardRouter; diff --git a/src/http/v1/v1.routes.ts b/src/http/v1/v1.routes.ts index d41dc8c..a656a49 100644 --- a/src/http/v1/v1.routes.ts +++ b/src/http/v1/v1.routes.ts @@ -7,7 +7,7 @@ import dashboardRouter from "@/http/v1/dashboard/routes.ts"; const apiRouter = new Router(); apiRouter.use("/api/v1", stellarRouter.routes(), stellarRouter.allowedMethods()); -apiRouter.use("/api/v1", bundleRouter.routes(), bundleRouter.allowedMethods()); apiRouter.use("/api/v1", dashboardRouter.routes(), dashboardRouter.allowedMethods()); +apiRouter.use("/api/v1", bundleRouter.routes(), bundleRouter.allowedMethods()); export default apiRouter;