feat: load storages while starting

This commit is contained in:
Noah Hsu
2022-08-11 21:32:33 +08:00
parent 74f1154e5e
commit 0fdfd1f2c2
7 changed files with 65 additions and 1 deletions

View File

@ -0,0 +1,16 @@
package middlewares
import (
"github.com/alist-org/alist/v3/internal/conf"
"github.com/alist-org/alist/v3/server/common"
"github.com/gin-gonic/gin"
)
func StoragesLoaded(c *gin.Context) {
if conf.StoragesLoaded {
c.Next()
} else {
common.ErrorStrResp(c, "Loading storage, please wait", 500)
c.Abort()
}
}