mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-30 00:30:31 +08:00
增加恢复模式
This commit is contained in:
17
internal/web/actions/default/recover/helper.go
Normal file
17
internal/web/actions/default/recover/helper.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user