internal/cloudapi: fix custom repo fields

Minor fixes to cloudapi custom repos:
- add missing `priority` field
- rename `repo_check_gpg` to `check_repo_gpg`
  to match `payload_repositories`
This commit is contained in:
Gianluca Zuccarelli 2023-05-02 15:23:33 +01:00 committed by Achilleas Koutsou
parent bc28daf6b6
commit 79284f3447
3 changed files with 137 additions and 130 deletions

View file

@ -353,8 +353,8 @@ func (h *apiHandlers) PostCompose(ctx echo.Context) error {
repoCustomization.GPGCheck = repo.CheckGpg
}
if repo.RepoCheckGpg != nil {
repoCustomization.RepoGPGCheck = repo.RepoCheckGpg
if repo.CheckRepoGpg != nil {
repoCustomization.RepoGPGCheck = repo.CheckRepoGpg
}
if repo.Enabled != nil {
@ -373,6 +373,10 @@ func (h *apiHandlers) PostCompose(ctx echo.Context) error {
repoCustomization.SSLVerify = *repo.SslVerify
}
if repo.Priority != nil {
repoCustomization.Priority = repo.Priority
}
repoCustomizations = append(repoCustomizations, repoCustomization)
}
if bp.Customizations == nil {