Kaynağa Gözat

Updated naming on git action config endpoint

jnfrati 3 yıl önce
ebeveyn
işleme
748863d7b4

+ 6 - 6
api/server/handlers/release/update_action_config.go → api/server/handlers/release/update_git_action_config.go

@@ -13,26 +13,26 @@ import (
 	"gorm.io/gorm"
 )
 
-type UpdateActionConfigHandler struct {
+type UpdateGitActionConfigHandler struct {
 	handlers.PorterHandlerReadWriter
 }
 
-func NewUpdateActionConfigHandler(
+func NewUpdateGitActionConfigHandler(
 	config *config.Config,
 	decoderValidator shared.RequestDecoderValidator,
 	writer shared.ResultWriter,
-) *UpdateActionConfigHandler {
-	return &UpdateActionConfigHandler{
+) *UpdateGitActionConfigHandler {
+	return &UpdateGitActionConfigHandler{
 		PorterHandlerReadWriter: handlers.NewDefaultPorterHandler(config, decoderValidator, writer),
 	}
 }
 
-func (c *UpdateActionConfigHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
+func (c *UpdateGitActionConfigHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
 	cluster, _ := r.Context().Value(types.ClusterScope).(*models.Cluster)
 	name, _ := requestutils.GetURLParamString(r, types.URLParamReleaseName)
 	namespace := r.Context().Value(types.NamespaceScope).(string)
 
-	request := &types.UpdateActionConfigRequest{}
+	request := &types.UpdateGitActionConfigRequest{}
 
 	if ok := c.DecodeAndValidate(w, r, request); !ok {
 		return

+ 1 - 1
api/server/router/release.go

@@ -833,7 +833,7 @@ func getReleaseRoutes(
 		},
 	)
 
-	updateGitActionConfigHandler := release.NewUpdateBuildConfigHandler(
+	updateGitActionConfigHandler := release.NewUpdateGitActionConfigHandler(
 		config,
 		factory.GetDecoderValidator(),
 		factory.GetResultWriter(),

+ 1 - 1
api/types/release.go

@@ -194,6 +194,6 @@ type PatchUpdateReleaseTags struct {
 	Tags []string `json:"tags"`
 }
 
-type UpdateActionConfigRequest struct {
+type UpdateGitActionConfigRequest struct {
 	GitActionConfig *GitActionConfig `json:"git_action_config"`
 }