30 lines
644 B
Go
30 lines
644 B
Go
package apps
|
|
|
|
import (
|
|
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
|
"github.com/TeaOSLab/EdgeUser/internal/web/actions/actionutils"
|
|
"github.com/iwind/TeaGo/actions"
|
|
)
|
|
|
|
type AppSettingsResetSignSecretAction struct {
|
|
actionutils.ParentAction
|
|
}
|
|
|
|
func (this *AppSettingsResetSignSecretAction) RunPost(params struct {
|
|
AppId int64
|
|
|
|
Must *actions.Must
|
|
}) {
|
|
params.Must.Field("appId", params.AppId).Gt(0, "请选择应用")
|
|
|
|
_, err := this.RPC().HTTPDNSAppRPC().ResetHTTPDNSAppSignSecret(this.UserContext(), &pb.ResetHTTPDNSAppSignSecretRequest{
|
|
AppDbId: params.AppId,
|
|
})
|
|
if err != nil {
|
|
this.ErrorPage(err)
|
|
return
|
|
}
|
|
|
|
this.Success()
|
|
}
|