cloudapi: Pass the RepoRegistry to the cloudapi Server

This commit is contained in:
Brian C. Lane 2024-02-02 16:53:11 -08:00 committed by Brian C. Lane
parent b8967d53bc
commit 01ba674cac
4 changed files with 16 additions and 6 deletions

View file

@ -4,18 +4,19 @@ import (
"net/http"
"github.com/osbuild/images/pkg/distrofactory"
"github.com/osbuild/osbuild-composer/internal/worker"
"github.com/osbuild/images/pkg/reporegistry"
v2 "github.com/osbuild/osbuild-composer/internal/cloudapi/v2"
"github.com/osbuild/osbuild-composer/internal/worker"
)
type Server struct {
v2 *v2.Server
}
func NewServer(workers *worker.Server, distros *distrofactory.Factory, config v2.ServerConfig) *Server {
func NewServer(workers *worker.Server, distros *distrofactory.Factory, repos *reporegistry.RepoRegistry, config v2.ServerConfig) *Server {
server := &Server{
v2: v2.NewServer(workers, distros, config),
v2: v2.NewServer(workers, distros, repos, config),
}
return server
}