mirror of https://github.com/Xhofe/alist
17 lines
319 B
Go
17 lines
319 B
Go
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()
|
|
}
|
|
}
|