From 7708ace1d8eae05b4664a1be70f2b3bb29166aa6 Mon Sep 17 00:00:00 2001 From: Chaim Lev-Ari Date: Tue, 14 Apr 2026 13:25:37 +0300 Subject: [PATCH] feat(gitops): add api for workflows [BE-12805] (#2273) Co-authored-by: Claude Sonnet 4.6 --- api/http/handler/gitops/handler.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/http/handler/gitops/handler.go b/api/http/handler/gitops/handler.go index 6297fa7bf..764899405 100644 --- a/api/http/handler/gitops/handler.go +++ b/api/http/handler/gitops/handler.go @@ -27,8 +27,10 @@ func NewHandler(bouncer security.BouncerService, dataStore dataservices.DataStor fileService: fileService, } - h.Handle("/gitops/repo/file/preview", - bouncer.AuthenticatedAccess(httperror.LoggerHandler(h.gitOperationRepoFilePreview))).Methods(http.MethodPost) + authenticatedRouter := h.NewRoute().Subrouter() + authenticatedRouter.Use(bouncer.AuthenticatedAccess) + + authenticatedRouter.Handle("/gitops/repo/file/preview", httperror.LoggerHandler(h.gitOperationRepoFilePreview)).Methods(http.MethodPost) return h }