mirror of
https://github.com/ipnet-mesh/meshcore-hub.git
synced 2026-08-08 09:53:05 +02:00
Remove internal UUID fields from API responses
Internal database UUIDs (id, node_id, receiver_node_id) were being exposed in API responses. These are implementation details that should not be visible to API consumers. The canonical identifier for nodes is the 64-char hex public_key. Changes: - Remove id, node_id from NodeTagRead, NodeRead schemas - Remove id from MemberRead schema - Remove id, receiver_node_id, node_id from MessageRead, AdvertisementRead, TracePathRead, TelemetryRead schemas - Update web map component to use public_key instead of member.id for owner filtering - Update tests to not assert on removed fields
This commit is contained in:
@@ -49,7 +49,6 @@ class TestGetAdvertisement:
|
||||
)
|
||||
assert response.status_code == 200
|
||||
data = response.json()
|
||||
assert data["id"] == sample_advertisement.id
|
||||
assert data["public_key"] == sample_advertisement.public_key
|
||||
|
||||
def test_get_advertisement_not_found(self, client_no_auth):
|
||||
|
||||
@@ -51,7 +51,6 @@ class TestGetMessage:
|
||||
response = client_no_auth.get(f"/api/v1/messages/{sample_message.id}")
|
||||
assert response.status_code == 200
|
||||
data = response.json()
|
||||
assert data["id"] == sample_message.id
|
||||
assert data["text"] == sample_message.text
|
||||
|
||||
def test_get_message_not_found(self, client_no_auth):
|
||||
|
||||
@@ -45,7 +45,6 @@ class TestGetTelemetry:
|
||||
response = client_no_auth.get(f"/api/v1/telemetry/{sample_telemetry.id}")
|
||||
assert response.status_code == 200
|
||||
data = response.json()
|
||||
assert data["id"] == sample_telemetry.id
|
||||
assert data["node_public_key"] == sample_telemetry.node_public_key
|
||||
|
||||
def test_get_telemetry_not_found(self, client_no_auth):
|
||||
|
||||
@@ -31,7 +31,6 @@ class TestGetTracePath:
|
||||
response = client_no_auth.get(f"/api/v1/trace-paths/{sample_trace_path.id}")
|
||||
assert response.status_code == 200
|
||||
data = response.json()
|
||||
assert data["id"] == sample_trace_path.id
|
||||
assert data["path_hashes"] == sample_trace_path.path_hashes
|
||||
|
||||
def test_get_trace_path_not_found(self, client_no_auth):
|
||||
|
||||
Reference in New Issue
Block a user