diff --git a/pkg/handlers/builders/handler.go b/pkg/handlers/builders/handler.go index 7d06f08f..b0006b3a 100644 --- a/pkg/handlers/builders/handler.go +++ b/pkg/handlers/builders/handler.go @@ -131,9 +131,7 @@ func (f factory) Initialize(e *echo.Echo) error { builderGroup.GET("/:builder_id/runners/:runner_id", handler.GetRunner) builderGroup.GET("/:builder_id/runners/:runner_id/stop", handler.GetRunnerStop) builderGroup.GET("/:builder_id/runners/:runner_id/rerun", handler.GetRunnerRerun) - - builderWithoutAuthGroup := e.Group(consts.APIV1 + "/namespaces/:namespace_id/repositories/:repository_id/builders") - builderWithoutAuthGroup.GET("/:builder_id/runners/:runner_id/log", handler.GetRunnerLog) + builderGroup.GET("/:builder_id/runners/:runner_id/log", handler.GetRunnerLog) } return nil } diff --git a/pkg/handlers/namespaces/handler.go b/pkg/handlers/namespaces/handler.go index fa19c5ce..fd1e5744 100644 --- a/pkg/handlers/namespaces/handler.go +++ b/pkg/handlers/namespaces/handler.go @@ -137,12 +137,11 @@ type factory struct{} // Initialize initializes the namespace handlers func (f factory) Initialize(e *echo.Echo) error { - namespaceGroupWithoutAuth := e.Group(consts.APIV1 + "/namespaces") namespaceGroup := e.Group(consts.APIV1+"/namespaces", middlewares.AuthWithConfig(middlewares.AuthConfig{})) namespaceHandler := handlerNew() - namespaceGroupWithoutAuth.GET("/", namespaceHandler.ListNamespaces) + namespaceGroup.GET("/", namespaceHandler.ListNamespaces) namespaceGroup.GET("/:id", namespaceHandler.GetNamespace) namespaceGroup.POST("/", namespaceHandler.PostNamespace) namespaceGroup.PUT("/:id", namespaceHandler.PutNamespace) diff --git a/pkg/handlers/namespaces/namespaces_list.go b/pkg/handlers/namespaces/namespaces_list.go index 93bfc6f5..015a7a9c 100644 --- a/pkg/handlers/namespaces/namespaces_list.go +++ b/pkg/handlers/namespaces/namespaces_list.go @@ -60,6 +60,7 @@ func (h *handler) ListNamespaces(c echo.Context) error { return xerrors.NewHTTPError(c, xerrors.HTTPErrCodeUnauthorized) } } + fmt.Println(63, iuser, user) var req types.ListNamespaceRequest err := utils.BindValidate(c, &req)