satellite/overlay: return email as part of NodeReputation
Make email accessible for email sending after reputation updates Change-Id: I760feee0f6ca58b76a2955a04c0c366c618656bb
This commit is contained in:
parent
4be042154c
commit
8c8688ca6b
@ -182,6 +182,7 @@ type NodeCriteria struct {
|
|||||||
|
|
||||||
// ReputationStatus indicates current reputation status for a node.
|
// ReputationStatus indicates current reputation status for a node.
|
||||||
type ReputationStatus struct {
|
type ReputationStatus struct {
|
||||||
|
Email string
|
||||||
Disqualified *time.Time
|
Disqualified *time.Time
|
||||||
DisqualificationReason *DisqualificationReason
|
DisqualificationReason *DisqualificationReason
|
||||||
UnknownAuditSuspended *time.Time
|
UnknownAuditSuspended *time.Time
|
||||||
|
@ -309,7 +309,7 @@ func (cache *overlaycache) getOnlineNodesForAuditRepair(ctx context.Context, nod
|
|||||||
|
|
||||||
var rows tagsql.Rows
|
var rows tagsql.Rows
|
||||||
rows, err = cache.db.Query(ctx, cache.db.Rebind(`
|
rows, err = cache.db.Query(ctx, cache.db.Rebind(`
|
||||||
SELECT last_net, id, address, last_ip_port, vetted_at,
|
SELECT last_net, id, address, email, last_ip_port, vetted_at,
|
||||||
unknown_audit_suspended, offline_suspended
|
unknown_audit_suspended, offline_suspended
|
||||||
FROM nodes
|
FROM nodes
|
||||||
WHERE id = any($1::bytea[])
|
WHERE id = any($1::bytea[])
|
||||||
@ -328,7 +328,7 @@ func (cache *overlaycache) getOnlineNodesForAuditRepair(ctx context.Context, nod
|
|||||||
node.Address = &pb.NodeAddress{Transport: pb.NodeTransport_TCP_TLS_GRPC}
|
node.Address = &pb.NodeAddress{Transport: pb.NodeTransport_TCP_TLS_GRPC}
|
||||||
|
|
||||||
var lastIPPort sql.NullString
|
var lastIPPort sql.NullString
|
||||||
err = rows.Scan(&node.LastNet, &node.ID, &node.Address.Address, &lastIPPort, &node.Reputation.VettedAt, &node.Reputation.UnknownAuditSuspended, &node.Reputation.OfflineSuspended)
|
err = rows.Scan(&node.LastNet, &node.ID, &node.Address.Address, &node.Reputation.Email, &lastIPPort, &node.Reputation.VettedAt, &node.Reputation.UnknownAuditSuspended, &node.Reputation.OfflineSuspended)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user