Initial commit (code only without large binaries)

This commit is contained in:
robin
2026-02-15 18:58:44 +08:00
commit 35df75498f
9442 changed files with 1495866 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
package lb
import (
"github.com/TeaOSLab/EdgeCommon/pkg/langs/codes"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/TeaOSLab/EdgeUser/internal/web/actions/actionutils"
)
type UpdateOnAction struct {
actionutils.ParentAction
}
func (this *UpdateOnAction) RunPost(params struct {
ServerId int64
IsOn bool
}) {
if params.IsOn {
defer this.CreateLogInfo(codes.Server_LogEnableServer, params.ServerId)
} else {
defer this.CreateLogInfo(codes.Server_LogDisableServer, params.ServerId)
}
_, err := this.RPC().ServerRPC().UpdateServerIsOn(this.UserContext(), &pb.UpdateServerIsOnRequest{
ServerId: params.ServerId,
IsOn: params.IsOn,
})
if err != nil {
this.ErrorPage(err)
return
}
this.Success()
}