Skip to content

Commit

Permalink
fix(api): add vdb archived check to notifications middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
remoterami committed Jan 6, 2025
1 parent 4dd7dac commit aa67df1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/pkg/api/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,10 @@ func addNotificationRoutes(hs *handlers.HandlerService, publicRouter, internalRo

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

0 comments on commit aa67df1

Please sign in to comment.