IP名单API增加IP添加时间

This commit is contained in:
刘祥超
2021-11-15 11:31:27 +08:00
parent 5b32343a2c
commit 1224758b5b
3 changed files with 27 additions and 0 deletions

View File

@@ -136,3 +136,18 @@ func (this *NodeLogService) UpdateNodeLogsRead(ctx context.Context, req *pb.Upda
}
return this.Success()
}
// UpdateAllNodeLogsRead 设置所有日志未已读
func (this *NodeLogService) UpdateAllNodeLogsRead(ctx context.Context, req *pb.UpdateAllNodeLogsReadRequest) (*pb.RPCSuccess, error) {
_, err := this.ValidateAdmin(ctx, 0)
if err != nil {
return nil, err
}
var tx = this.NullTx()
err = models.SharedNodeLogDAO.UpdateAllNodeLogsRead(tx)
if err != nil {
return nil, err
}
return this.Success()
}