static files

This commit is contained in:
微凉
2021-10-30 19:26:23 +08:00
parent 2780efaea8
commit eb358e6ede
7 changed files with 29 additions and 9 deletions

View File

@ -1,9 +1,11 @@
package server
import (
"github.com/Xhofe/alist/conf"
"github.com/Xhofe/alist/model"
"github.com/gofiber/fiber/v2"
"strconv"
"strings"
)
func SaveSettings(ctx *fiber.Ctx) error {
@ -17,6 +19,10 @@ func SaveSettings(ctx *fiber.Ctx) error {
if err := model.SaveSettings(req); err != nil {
return ErrorResp(ctx, err, 500)
} else {
textTypes, err := model.GetSettingByKey("text types")
if err==nil{
conf.ImageTypes = strings.Split(textTypes.Value,",")
}
return SuccessResp(ctx)
}
}