mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-12-21 02:08:29 +00:00
change SetBuildRootPackages to use proper pq types and set defaults on nil
This commit is contained in:
parent
60a3885b91
commit
aa3a97cb87
@ -46,7 +46,7 @@ type Access interface {
|
||||
CreateProject(project *peridotpb.Project) (*models.Project, error)
|
||||
UpdateProject(id string, project *peridotpb.Project) (*models.Project, error)
|
||||
SetProjectKeys(projectId string, username string, password string) error
|
||||
SetBuildRootPackages(projectId string, srpmPackages []string, buildPackages []string) error
|
||||
SetBuildRootPackages(projectId string, srpmPackages pq.StringArray, buildPackages pq.StringArray) error
|
||||
|
||||
CreateBuild(packageId string, packageVersionId string, taskId string, projectId string) (*models.Build, error)
|
||||
GetArtifactsForBuild(buildId string) (models.TaskArtifacts, error)
|
||||
|
@ -339,7 +339,14 @@ func (a *Access) SetProjectKeys(projectId string, username string, password stri
|
||||
return err
|
||||
}
|
||||
|
||||
func (a *Access) SetBuildRootPackages(projectId string, srpmPackages []string, buildPackages []string) error {
|
||||
func (a *Access) SetBuildRootPackages(projectId string, srpmPackages pq.StringArray, buildPackages pq.StringArray) error {
|
||||
if srpmPackages == nil {
|
||||
srpmPackages = pq.StringArray{}
|
||||
}
|
||||
if buildPackages == nil {
|
||||
buildPackages = pq.StringArray{}
|
||||
}
|
||||
|
||||
_, err := a.query.Exec(
|
||||
`
|
||||
update projects set srpm_stage_packages = $2, build_stage_packages = $3
|
||||
|
Loading…
Reference in New Issue
Block a user