Skip to content

Commit f4ba11f

Browse files
author
bajins
committed
fixed 修复获取下载链接失败问题
1 parent 2769d8d commit f4ba11f

File tree

6 files changed

+205
-204
lines changed

6 files changed

+205
-204
lines changed

controller.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,14 @@ func GetNetSarangDownloadUrl(c *gin.Context) {
178178
info := reptile.NetsarangInfo[app]
179179
// 如果数据不为空,并且日期为今天,这么做是为了避免消耗过多的性能,每天只查询一次
180180
if info == nil || len(info) == 1 || info[1].(string) != "" {
181-
_, err := reptile.DownloadNetsarang(app)
181+
ctx, cancel, mail, err := reptile.NetsarangGetMail()
182+
defer cancel()
183+
if err != nil {
184+
log.Println(err)
185+
ErrorJSON(c, http.StatusInternalServerError, "系统错误!")
186+
return
187+
}
188+
_, err = reptile.NetsarangGetInfo(ctx, mail, app)
182189
if err != nil {
183190
log.Println(err)
184191
ErrorJSON(c, http.StatusInternalServerError, "系统错误!")

0 commit comments

Comments
 (0)