[Refactor]: Core/API Split (#1506)

Refactors api folder to core, creates firm split between backend code and api frontend.
This commit is contained in:
Dave 2024-01-05 09:34:56 -05:00 committed by GitHub
parent bcf02449b3
commit ab7b4d5ee9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
77 changed files with 3441 additions and 3117 deletions

View file

@ -22,11 +22,11 @@ func InstallModelFromGallery(galleries []Gallery, name string, basePath string,
applyModel := func(model *GalleryModel) error {
name = strings.ReplaceAll(name, string(os.PathSeparator), "__")
var config Config
var config InstallableModel
if len(model.URL) > 0 {
var err error
config, err = GetGalleryConfigFromURL(model.URL)
config, err = GetInstallableModelFromURL(model.URL)
if err != nil {
return err
}
@ -36,7 +36,7 @@ func InstallModelFromGallery(galleries []Gallery, name string, basePath string,
if err != nil {
return err
}
config = Config{
config = InstallableModel{
ConfigFile: string(reYamlConfig),
Description: model.Description,
License: model.License,