tangled
alpha
login
or
join now
ptr.pet
/
hydrant
26
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
26
fork
atom
overview
issues
6
pulls
pipelines
[api] revert direct value parsing in stream
ptr.pet
6 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
},
12
response::IntoResponse,
13
};
14
-
use jacquard_common::CowStr;
15
use miette::{Context, IntoDiagnostic};
16
use serde::Deserialize;
17
use std::sync::Arc;
···
177
.map(Option::flatten);
178
match block_bytes {
179
Ok(Some(block_bytes)) => {
180
-
match serde_ipld_dagcbor::from_slice::<serde_json::Value>(&block_bytes)
181
-
{
182
-
Ok(val) => record_val = val,
183
Err(e) => {
184
error!(err = %e, "cant parse block, must be corrupted?");
185
return;
···
209
collection,
210
rkey: CowStr::Owned(rkey.to_smolstr().into()),
211
action: CowStr::Borrowed(action.as_str()),
212
-
record: Some(record_val),
213
cid: cid.map(|c| jacquard_common::types::cid::Cid::ipld(c).into()),
214
}),
215
identity: None,
···
11
},
12
response::IntoResponse,
13
};
14
+
use jacquard_common::{CowStr, RawData};
15
use miette::{Context, IntoDiagnostic};
16
use serde::Deserialize;
17
use std::sync::Arc;
···
177
.map(Option::flatten);
178
match block_bytes {
179
Ok(Some(block_bytes)) => {
180
+
match serde_ipld_dagcbor::from_slice::<RawData>(&block_bytes) {
181
+
Ok(val) => record_val = serde_json::to_value(val).ok(),
0
182
Err(e) => {
183
error!(err = %e, "cant parse block, must be corrupted?");
184
return;
···
208
collection,
209
rkey: CowStr::Owned(rkey.to_smolstr().into()),
210
action: CowStr::Borrowed(action.as_str()),
211
+
record: record_val,
212
cid: cid.map(|c| jacquard_common::types::cid::Cid::ipld(c).into()),
213
}),
214
identity: None,