Skip to content

Commit

Permalink
Close apis to get all triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
Tetrergeru committed Mar 26, 2024
1 parent 9641606 commit 3593fb9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions api/handler/triggers.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ func triggers(metricSourceProvider *metricSource.SourceProvider, searcher moira.
return func(router chi.Router) {
router.Use(middleware.MetricSourceProvider(metricSourceProvider))
router.Use(middleware.SearchIndexContext(searcher))
router.Get("/", getAllTriggers)
router.Get("/unused", getUnusedTriggers)

router.With(middleware.AdminOnlyMiddleware()).Get("/", getAllTriggers)
router.With(middleware.AdminOnlyMiddleware()).Get("/unused", getUnusedTriggers)

router.Put("/", createTrigger)
router.Put("/check", triggerCheck)
router.Route("/{triggerId}", trigger)
Expand Down

0 comments on commit 3593fb9

Please sign in to comment.