Files
EdgeAdmin/internal/web/actions/default/recover/helper.go

18 lines
327 B
Go
Raw Normal View History

2021-07-20 17:15:17 +08:00
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
}