Skip to content

Commit

Permalink
Add experimental JSON RPC API
Browse files Browse the repository at this point in the history
  • Loading branch information
bubelov committed Aug 26, 2024
1 parent d347210 commit 0bd2ea1
Show file tree
Hide file tree
Showing 8 changed files with 439 additions and 18 deletions.
195 changes: 194 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,7 @@ http = { version = "1.1.0", default-features = false }
deadpool-sqlite = { version = "0.8.1", default-features = false, features = ["rt_tokio_1"] }

# https://github.com/AaronErhardt/actix-governor/releases
actix-governor = { version = "0.5.0", default-features = false }
actix-governor = { version = "0.5.0", default-features = false }

# https://crates.io/crates/jsonrpc-v2
jsonrpc-v2 = { version = "0.13.0", default-features = false, features = ["actix-web-v4-integration", "easy-errors"] }
2 changes: 1 addition & 1 deletion src/area/admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pub async fn patch(
let area = pool
.get()
.await?
.interact(move |conn| area::service::patch_tags(area.id, args.tags.clone(), conn))
.interact(move |conn| area::service::patch_tags(&area.id.to_string(), args.tags.clone(), conn))
.await??;
let log_message = format!(
"{} updated area https://api.btcmap.org/v3/areas/{}",
Expand Down
1 change: 1 addition & 0 deletions src/area/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
pub mod model;
pub use model::Area;
pub mod admin;
pub mod rpc;
pub mod service;
pub mod v2;
pub mod v3;
Loading

0 comments on commit 0bd2ea1

Please sign in to comment.