From 9bc88f57634af46d38ab811000ee9aa805ed82f6 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 10 Nov 2022 18:38:53 -0800 Subject: pds: in some responses, CIDs as strings (not byte arrays) --- adenosine-pds/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adenosine-pds/src/lib.rs b/adenosine-pds/src/lib.rs index cc233b1..9a4aa8a 100644 --- a/adenosine-pds/src/lib.rs +++ b/adenosine-pds/src/lib.rs @@ -370,7 +370,7 @@ fn xrpc_get_handler( let mut srv = srv.lock().or(Err(XrpcError::MutexPoisoned))?; srv.repo .lookup_commit(&did)? - .map(|v| json!({ "root": v })) + .map(|v| json!({ "root": v.to_string() })) .ok_or(XrpcError::NotFound(format!("no repository found for DID: {}", did)).into()) } "com.atproto.repo.listRecords" => { @@ -391,7 +391,7 @@ fn xrpc_get_handler( let record = srv.repo.get_ipld(cid)?; record_list.push(json!({ "uri": format!("at://{}{}", did, mst_key), - "cid": cid, + "cid": cid.to_string(), "value": ipld_into_json_value(record), })); } -- cgit v1.2.3