adding network_map_data: compute Routers field

Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
This commit is contained in:
Dmitri Dolguikh
2026-07-31 17:56:52 +02:00
parent c2f8360b00
commit 5d6117d2c0
4 changed files with 139 additions and 42 deletions
@@ -33,7 +33,7 @@ func GetNetworkViaPgxConnection(ctx context.Context, con *pgx.Conn, accountId st
return nmdata.Network{}, err
}
n, err := pgx.CollectOneRow(rows, pgx.RowToStructByName[network])
n, err := pgx.CollectOneRow(rows, pgx.RowToStructByName[accountnetwork])
if err != nil {
return nmdata.Network{}, err
}
@@ -48,7 +48,7 @@ func GetNetworkViaPgxConnection(ctx context.Context, con *pgx.Conn, accountId st
return toret, nil
}
type network struct {
type accountnetwork struct {
Identifier sql.NullString
Net json.RawMessage
NetV6 json.RawMessage