增加恢复模式

This commit is contained in:
GoEdgeLab
2021-07-20 17:15:17 +08:00
parent 320b325496
commit 064bf2016b
34 changed files with 948 additions and 285 deletions

View File

@@ -0,0 +1,17 @@
package recover
import (
teaconst "github.com/TeaOSLab/EdgeAdmin/internal/const"
"github.com/iwind/TeaGo/actions"
)
type Helper struct {
}
func (this *Helper) BeforeAction(actionPtr actions.ActionWrapper) (goNext bool) {
if !teaconst.IsRecoverMode {
actionPtr.Object().RedirectURL("/")
return false
}
return true
}