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:
Binary file not shown.
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user