[WIP] working download and replace.

This commit is contained in:
Vladimir Stoilov
2024-08-30 12:40:51 +03:00
parent f7abb700bf
commit 701505ae75
18 changed files with 168 additions and 276 deletions

View File

@@ -82,5 +82,5 @@ func New(instance instance) (*UI, error) {
type instance interface {
API() *api.API
Updates() *updates.Updates
BinaryUpdates() *updates.Updates
}

View File

@@ -91,7 +91,7 @@ func (bs *archiveServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
// get file from update system
zipFile, err := module.instance.Updates().GetFile(fmt.Sprintf("%s.zip", moduleName))
zipFile, err := module.instance.BinaryUpdates().GetFile(fmt.Sprintf("%s.zip", moduleName))
if err != nil {
if errors.Is(err, registry.ErrNotFound) {
log.Tracef("ui: requested module %s does not exist", moduleName)