From 78f387cbc18bc0619a58fb2c3dfe2336fff517b4 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Tue, 2 Jun 2026 11:44:32 -0400 Subject: [PATCH] core/slingshot: partially revert record fetching changes --- core/slingshot.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/core/slingshot.py b/core/slingshot.py index 7ca0511..1f56483 100644 --- a/core/slingshot.py +++ b/core/slingshot.py @@ -3,7 +3,7 @@ import asyncio import httpx from core.cache import TTLCache -from core.models import BacklinkRef, MiniDoc, Record +from core.models import AtUri, BacklinkRef, MiniDoc, Record from core.shared import SERVICES BASE_URL = SERVICES["slingshot"] @@ -26,13 +26,8 @@ async def get_record( async def get_record_by_uri(client: httpx.AsyncClient, at_uri: str) -> Record: """Fetch a single record by AT-URI.""" - resp = await client.get( - f"{BASE_URL}/blue.microcosm.repo.getRecordByUri", - params={"uri": at_uri}, - ) - resp.raise_for_status() - data = resp.json() - return Record(uri=data["uri"], cid=data["cid"], value=data["value"]) + parsed = AtUri.parse(at_uri) + return await get_record(client, parsed.did, parsed.collection, parsed.rkey) async def resolve_identity(client: httpx.AsyncClient, identifier: str) -> MiniDoc: -- 2.51.2