Skip to content

Commit

Permalink
Fix sql query
Browse files Browse the repository at this point in the history
  • Loading branch information
gianalarcon committed Feb 29, 2024
1 parent 7e09a0c commit 445e359
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/torii/grpc/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ impl DojoWorld {
async fn events_all(&self, limit: u32, offset: u32) -> Result<Vec<proto::types::Event>, Error> {
let query = r#"
SELECT keys, data, transaction_hash
FROM events DESC
FROM events
ORDER BY id DESC
LIMIT ? OFFSET ?
"#
.to_string();

Check warning on line 137 in crates/torii/grpc/src/server/mod.rs

View check run for this annotation

Codecov / codecov/patch

crates/torii/grpc/src/server/mod.rs#L130-L137

Added lines #L130 - L137 were not covered by tests
Expand Down Expand Up @@ -280,7 +281,8 @@ impl DojoWorld {
let events_query = r#"
SELECT keys, data, transaction_hash
FROM events
WHERE keys LIKE ? DESC
WHERE keys LIKE ?
ORDER BY id DESC

Check warning on line 285 in crates/torii/grpc/src/server/mod.rs

View check run for this annotation

Codecov / codecov/patch

crates/torii/grpc/src/server/mod.rs#L280-L285

Added lines #L280 - L285 were not covered by tests
LIMIT ? OFFSET ?
"#
.to_string();
Expand Down

0 comments on commit 445e359

Please sign in to comment.