package ech import ( "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils" "github.com/iwind/TeaGo/actions" ) type RollbackMfaPopupAction struct { actionutils.ParentAction } func (this *RollbackMfaPopupAction) Init() { this.Nav("", "", "") } func (this *RollbackMfaPopupAction) RunGet(params struct { LogId int64 }) { this.Data["logId"] = params.LogId this.Show() } func (this *RollbackMfaPopupAction) RunPost(params struct { LogId int64 Reason string OtpCode1 string OtpCode2 string Must *actions.Must CSRF *actionutils.CSRF }) { params.Must.Field("reason", params.Reason).Require("please input rollback reason") params.Must.Field("otpCode1", params.OtpCode1).Require("please input first otp code") params.Must.Field("otpCode2", params.OtpCode2).Require("please input second otp code") this.Success() }