diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2022-11-10 18:38:53 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2022-11-10 18:38:53 -0800 |
commit | 9bc88f57634af46d38ab811000ee9aa805ed82f6 (patch) | |
tree | 020f4e9e9f1aae1bb37b62006c10e15ba4aac277 /adenosine-pds | |
parent | 64c9d94476e29724243c6a6488ba4ce41ce24114 (diff) | |
download | adenosine-9bc88f57634af46d38ab811000ee9aa805ed82f6.tar.gz adenosine-9bc88f57634af46d38ab811000ee9aa805ed82f6.zip |
pds: in some responses, CIDs as strings (not byte arrays)
Diffstat (limited to 'adenosine-pds')
-rw-r--r-- | adenosine-pds/src/lib.rs | 4 |
1 files 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), })); } |