From 47bea7cc3857f03381cf197eb21ed597f7608f32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=AE=E5=87=89?= <927625802@qq.com> Date: Sat, 30 Oct 2021 21:06:38 +0800 Subject: [PATCH] :bug: ali proxy --- bootstrap/model.go | 2 +- drivers/alidrive.go | 2 +- server/setting.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bootstrap/model.go b/bootstrap/model.go index 43b88c22..48cd5f72 100644 --- a/bootstrap/model.go +++ b/bootstrap/model.go @@ -166,6 +166,6 @@ func initSettings() { } textTypes, err := model.GetSettingByKey("text types") if err==nil{ - conf.ImageTypes = strings.Split(textTypes.Value,",") + conf.TextTypes = strings.Split(textTypes.Value,",") } } diff --git a/drivers/alidrive.go b/drivers/alidrive.go index 2e29d6bc..39c9f697 100644 --- a/drivers/alidrive.go +++ b/drivers/alidrive.go @@ -189,7 +189,7 @@ func (a AliDrive) Link(path string, account *model.Account) (string, error) { if err != nil { return "", err } - parentFiles_, _ := conf.Cache.Get(conf.Ctx, dir) + parentFiles_, _ := conf.Cache.Get(conf.Ctx, fmt.Sprintf("%s%s", account.Name, dir)) parentFiles, _ := parentFiles_.([]AliFile) for _, file := range parentFiles { if file.Name == name { diff --git a/server/setting.go b/server/setting.go index 3b5aceb5..052dad61 100644 --- a/server/setting.go +++ b/server/setting.go @@ -21,7 +21,7 @@ func SaveSettings(ctx *fiber.Ctx) error { } else { textTypes, err := model.GetSettingByKey("text types") if err==nil{ - conf.ImageTypes = strings.Split(textTypes.Value,",") + conf.TextTypes = strings.Split(textTypes.Value,",") } return SuccessResp(ctx) }