🐎 加入缓存

This commit is contained in:
微凉
2020-12-29 13:37:58 +08:00
parent 02e665ae37
commit bf3f741b22
16 changed files with 270 additions and 138 deletions

View File

@@ -2,6 +2,7 @@ package server
import (
"github.com/Xhofe/alist/conf"
"github.com/Xhofe/alist/server/controllers"
"github.com/gin-contrib/static"
"github.com/gin-gonic/gin"
log "github.com/sirupsen/logrus"
@@ -20,10 +21,11 @@ func InitApiRouter(engine *gin.Engine) {
})
v2:=engine.Group("/api")
{
v2.GET("/info",Info)
v2.POST("/get",Get)
v2.POST("/list",List)
v2.POST("/search",Search)
v2.GET("/info",controllers.Info)
v2.POST("/get",controllers.Get)
v2.POST("/list",controllers.List)
v2.POST("/search",controllers.Search)
}
engine.GET("/d/*file_id",Down)
engine.GET("/d/*file_id",controllers.Down)
engine.GET("/cache/:password",controllers.RefreshCache)
}