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) }