27 lines
619 B
Go
27 lines
619 B
Go
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
|
//go:build plus
|
|
|
|
package scripts
|
|
|
|
import (
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
|
"github.com/TeaOSLab/EdgeCommon/pkg/langs/codes"
|
|
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
|
)
|
|
|
|
type PublishAction struct {
|
|
actionutils.ParentAction
|
|
}
|
|
|
|
func (this *PublishAction) RunPost(params struct{}) {
|
|
defer this.CreateLogInfo(codes.Script_LogPublishScripts)
|
|
|
|
_, err := this.RPC().ScriptRPC().PublishScripts(this.AdminContext(), &pb.PublishScriptsRequest{})
|
|
if err != nil {
|
|
this.ErrorPage(err)
|
|
return
|
|
}
|
|
|
|
this.Success()
|
|
}
|