mirror of
https://github.com/AlistGo/alist.git
synced 2025-06-05 01:24:46 +08:00
✨ static files
This commit is contained in:
@ -17,7 +17,6 @@ func InitApiRouter(app *fiber.App) {
|
||||
api.Use(SetSuccess)
|
||||
public := api.Group("/public")
|
||||
{
|
||||
// TODO check accounts
|
||||
public.Post("/path", CheckAccount, Path)
|
||||
public.Get("/settings", GetSettingsPublic)
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user