🔨 switch fiber to gin

This commit is contained in:
微凉
2021-11-13 15:53:26 +08:00
parent 65ec4e3611
commit cf07b3921c
22 changed files with 320 additions and 252 deletions

View File

@ -2,14 +2,14 @@ package server
import (
"github.com/Xhofe/alist/conf"
"github.com/gofiber/fiber/v2"
"github.com/gin-gonic/gin"
)
func ClearCache(ctx *fiber.Ctx) error {
func ClearCache(c *gin.Context) {
err := conf.Cache.Clear(conf.Ctx)
if err != nil {
return ErrorResp(ctx,err,500)
}else {
return SuccessResp(ctx)
ErrorResp(c, err, 500)
} else {
SuccessResp(c)
}
}
}