feat(gitops): improve the data model BE-12919 (#2819)

This commit is contained in:
andres-portainer
2026-06-08 15:01:55 -03:00
committed by GitHub
parent 63eb96859d
commit df7a4b5d6f
41 changed files with 641 additions and 563 deletions
@@ -60,9 +60,9 @@ func BuildGitSource(payload GitSourceCreatePayload) *portainer.Source {
}
return &portainer.Source{
Name: name,
Type: portainer.SourceTypeGit,
GitConfig: gitConfig,
Name: name,
Type: portainer.SourceTypeGit,
Git: gitConfig,
}
}
@@ -96,7 +96,7 @@ func (h *Handler) gitSourceCreate(w http.ResponseWriter, r *http.Request) *httpe
return httperror.InternalServerError("Unable to create source", err)
}
src.GitConfig = gittypes.SanitizeRepoConfig(src.GitConfig)
src.Git = gittypes.SanitizeRepoConfig(src.Git)
return response.JSONWithStatus(w, src, http.StatusCreated)
}