优化代码

This commit is contained in:
GoEdgeLab
2022-07-22 15:05:30 +08:00
parent 95e849c998
commit 7f64c98d88
72 changed files with 675 additions and 628 deletions

View File

@@ -13,7 +13,7 @@ type SysLockerService struct {
// SysLockerLock 获得锁
func (this *SysLockerService) SysLockerLock(ctx context.Context, req *pb.SysLockerLockRequest) (*pb.SysLockerLockResponse, error) {
_, userId, err := this.ValidateAdminAndUser(ctx, 0, 0)
_, userId, err := this.ValidateAdminAndUser(ctx)
if err != nil {
_, err = this.ValidateMonitorNode(ctx)
if err != nil {
@@ -43,7 +43,7 @@ func (this *SysLockerService) SysLockerLock(ctx context.Context, req *pb.SysLock
// SysLockerUnlock 释放锁
func (this *SysLockerService) SysLockerUnlock(ctx context.Context, req *pb.SysLockerUnlockRequest) (*pb.RPCSuccess, error) {
_, userId, err := this.ValidateAdminAndUser(ctx, 0, 0)
_, userId, err := this.ValidateAdminAndUser(ctx)
if err != nil {
_, err = this.ValidateMonitorNode(ctx)
if err != nil {