diff --git a/internal/service/router.go b/internal/service/router.go index 033f1d9..302a1a6 100644 --- a/internal/service/router.go +++ b/internal/service/router.go @@ -47,8 +47,8 @@ func Run(ctx context.Context, cfg config.Config) { }) r.Route("/daily_questions", func(r chi.Router) { + r.Use(authMW) r.Route("/admin", func(r chi.Router) { - r.Use(authMW) r.Delete("/{question_id}", handlers.DeleteDailyQuestion) r.Patch("/{question_id}", handlers.EditDailyQuestion) r.Post("/", handlers.CreateDailyQuestion)