mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 16:26:38 +00:00
[management] use NullBool for terminated flag (#5829)
This commit is contained in:
@@ -2099,6 +2099,7 @@ func (s *SqlStore) getServices(ctx context.Context, accountID string) ([]*rpserv
|
|||||||
var createdAt, certIssuedAt sql.NullTime
|
var createdAt, certIssuedAt sql.NullTime
|
||||||
var status, proxyCluster, sessionPrivateKey, sessionPublicKey sql.NullString
|
var status, proxyCluster, sessionPrivateKey, sessionPublicKey sql.NullString
|
||||||
var mode, source, sourcePeer sql.NullString
|
var mode, source, sourcePeer sql.NullString
|
||||||
|
var terminated sql.NullBool
|
||||||
err := row.Scan(
|
err := row.Scan(
|
||||||
&s.ID,
|
&s.ID,
|
||||||
&s.AccountID,
|
&s.AccountID,
|
||||||
@@ -2119,7 +2120,7 @@ func (s *SqlStore) getServices(ctx context.Context, accountID string) ([]*rpserv
|
|||||||
&s.PortAutoAssigned,
|
&s.PortAutoAssigned,
|
||||||
&source,
|
&source,
|
||||||
&sourcePeer,
|
&sourcePeer,
|
||||||
&s.Terminated,
|
&terminated,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -2160,7 +2161,9 @@ func (s *SqlStore) getServices(ctx context.Context, accountID string) ([]*rpserv
|
|||||||
if sourcePeer.Valid {
|
if sourcePeer.Valid {
|
||||||
s.SourcePeer = sourcePeer.String
|
s.SourcePeer = sourcePeer.String
|
||||||
}
|
}
|
||||||
|
if terminated.Valid {
|
||||||
|
s.Terminated = terminated.Bool
|
||||||
|
}
|
||||||
s.Targets = []*rpservice.Target{}
|
s.Targets = []*rpservice.Target{}
|
||||||
return &s, nil
|
return &s, nil
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user