sif: Move 99_0_115.zip out of database

Better for modification

Signed-off-by: Yuan Si <do4suki@gmail.com>
This commit is contained in:
2023-06-24 19:16:38 +08:00
parent 9d03532a1b
commit cf06d1320d
2 changed files with 15 additions and 0 deletions
BIN
View File
Binary file not shown.
+15
View File
@@ -7,6 +7,7 @@ import (
"honoka-chan/config"
"honoka-chan/encrypt"
"honoka-chan/model"
"io"
"net/http"
"strings"
"time"
@@ -122,6 +123,20 @@ func DownloadUpdate(ctx *gin.Context) {
Version: config.PackageVersion,
})
}
patchFileUrl := fmt.Sprintf("%s/%s/archives/99_0_115.zip", CdnUrl, downloadReq.TargetOs)
resp, err := http.Get(patchFileUrl)
if err == nil {
res, err := io.ReadAll(resp.Body)
if err == nil {
pkgList = append(pkgList, model.UpdateRes{
Size: len(res),
URL: patchFileUrl,
Version: config.PackageVersion,
})
}
defer resp.Body.Close()
}
}
updateResp := model.UpdateResp{