优化消息发送相关代码/删除监控相关代码

This commit is contained in:
刘祥超
2023-10-12 20:11:21 +08:00
parent 7692fed38d
commit 7e72a90f53
18 changed files with 178 additions and 740 deletions

View File

@@ -14,12 +14,6 @@ type SysLockerService struct {
// SysLockerLock 获得锁
func (this *SysLockerService) SysLockerLock(ctx context.Context, req *pb.SysLockerLockRequest) (*pb.SysLockerLockResponse, error) {
_, userId, err := this.ValidateAdminAndUser(ctx, false)
if err != nil {
_, err = this.ValidateMonitorNode(ctx)
if err != nil {
return nil, err
}
}
key := req.Key
if userId > 0 {
@@ -44,12 +38,6 @@ 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, false)
if err != nil {
_, err = this.ValidateMonitorNode(ctx)
if err != nil {
return nil, err
}
}
key := req.Key
if userId > 0 {