tangled
alpha
login
or
join now
ptr.pet
/
hydrant
24
fork
atom
at protocol indexer with flexible filtering, xrpc queries, and a cursor-backed event stream, built on fjall
at-protocol
atproto
indexer
rust
fjall
24
fork
atom
overview
issues
6
pulls
pipelines
[api] revert direct value parsing in stream
ptr.pet
4 days ago
994d3cfc
21ef164e
verified
This commit was signed with the committer's
known signature
.
ptr.pet
SSH Key Fingerprint:
SHA256:Abmvag+juovVufZTxyWY8KcVgrznxvBjQpJesv071Aw=
+4
-5
1 changed file
expand all
collapse all
unified
split
src
api
stream.rs
+4
-5
src/api/stream.rs
···
11
11
},
12
12
response::IntoResponse,
13
13
};
14
14
-
use jacquard_common::CowStr;
14
14
+
use jacquard_common::{CowStr, RawData};
15
15
use miette::{Context, IntoDiagnostic};
16
16
use serde::Deserialize;
17
17
use std::sync::Arc;
···
177
177
.map(Option::flatten);
178
178
match block_bytes {
179
179
Ok(Some(block_bytes)) => {
180
180
-
match serde_ipld_dagcbor::from_slice::<serde_json::Value>(&block_bytes)
181
181
-
{
182
182
-
Ok(val) => record_val = val,
180
180
+
match serde_ipld_dagcbor::from_slice::<RawData>(&block_bytes) {
181
181
+
Ok(val) => record_val = serde_json::to_value(val).ok(),
183
182
Err(e) => {
184
183
error!(err = %e, "cant parse block, must be corrupted?");
185
184
return;
···
209
208
collection,
210
209
rkey: CowStr::Owned(rkey.to_smolstr().into()),
211
210
action: CowStr::Borrowed(action.as_str()),
212
212
-
record: Some(record_val),
211
211
+
record: record_val,
213
212
cid: cid.map(|c| jacquard_common::types::cid::Cid::ipld(c).into()),
214
213
}),
215
214
identity: None,