Skip to content

Commit 300d945

Browse files
committed
fix(api): add vdb archived check to notifications middleware
1 parent b83506c commit 300d945

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

backend/pkg/api/router.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,10 @@ func addNotificationRoutes(hs *handlers.HandlerService, publicRouter, internalRo
354354

355355
publicDashboardNotificationSettingsRouter := publicNotificationRouter.NewRoute().Subrouter()
356356
internalDashboardNotificationSettingsRouter := internalNotificationRouter.NewRoute().Subrouter()
357-
// TODO add adb auth middleware to account dashboard endpoints once they are implemented
357+
// TODO add adb auth and archivedCheck middleware to account dashboard endpoints once they are implemented
358358
if !debug {
359-
publicDashboardNotificationSettingsRouter.Use(hs.VDBAuthMiddleware)
360-
internalDashboardNotificationSettingsRouter.Use(hs.VDBAuthMiddleware)
359+
publicDashboardNotificationSettingsRouter.Use(hs.VDBAuthMiddleware, hs.VDBArchivedCheckMiddleware)
360+
internalDashboardNotificationSettingsRouter.Use(hs.VDBAuthMiddleware, hs.VDBArchivedCheckMiddleware)
361361
}
362362
dashboardSettingsEndpoints := []endpoint{
363363
{http.MethodGet, "/validator-dashboards/{dashboard_id}/groups/{group_id}/epochs/{epoch}", hs.PublicGetUserNotificationsValidatorDashboard, hs.InternalGetUserNotificationsValidatorDashboard},

0 commit comments

Comments
 (0)