🎨 Improve the code structure

This commit is contained in:
微凉
2021-12-07 15:56:43 +08:00
parent 6e8d551420
commit 03580fd76c
14 changed files with 220 additions and 176 deletions

View File

@ -0,0 +1,16 @@
package controllers
import (
"github.com/Xhofe/alist/conf"
"github.com/Xhofe/alist/server/common"
"github.com/gin-gonic/gin"
)
func ClearCache(c *gin.Context) {
err := conf.Cache.Clear(conf.Ctx)
if err != nil {
common.ErrorResp(c, err, 500)
} else {
common.SuccessResp(c)
}
}