Skip to content

Commit aa67df1

Browse files
committed
fix(api): add vdb archived check to notifications middleware
1 parent 4dd7dac commit aa67df1

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
@@ -353,10 +353,10 @@ func addNotificationRoutes(hs *handlers.HandlerService, publicRouter, internalRo
353353

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

0 commit comments

Comments
 (0)