From 9aa59e550aebb36edd957f758496db8bddf4fc9c Mon Sep 17 00:00:00 2001 From: trpdjke Date: Tue, 27 Aug 2024 17:37:16 +0300 Subject: [PATCH] fix router --- internal/service/router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)