Skip to content

Commit 144d214

Browse files
authored
Fix cursor bug (#546)
1 parent d53998d commit 144d214

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

bindings_ffi/src/v2.rs

+5-7
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ impl From<QueryResponse> for FfiV2QueryResponse {
205205
paging_info: resp.paging_info.map(|paging_info| FfiPagingInfo {
206206
limit: paging_info.limit,
207207
direction: FfiSortDirection::from_i32(paging_info.direction),
208-
cursor: None,
208+
cursor: proto_cursor_to_ffi(paging_info.cursor),
209209
}),
210210
}
211211
}
@@ -215,12 +215,10 @@ impl From<FfiV2QueryResponse> for QueryResponse {
215215
fn from(resp: FfiV2QueryResponse) -> Self {
216216
Self {
217217
envelopes: resp.envelopes.into_iter().map(|env| env.into()).collect(),
218-
paging_info: resp.paging_info.map(|paging_info| {
219-
PagingInfo {
220-
limit: paging_info.limit,
221-
direction: paging_info.direction as i32,
222-
cursor: None, // TODO: fix me
223-
}
218+
paging_info: resp.paging_info.map(|paging_info| PagingInfo {
219+
limit: paging_info.limit,
220+
direction: paging_info.direction as i32,
221+
cursor: paging_info.cursor.map(|c| c.into()),
224222
}),
225223
}
226224
}

0 commit comments

Comments
 (0)