Skip to content

Commit 81d12c9

Browse files
committed
fix(service): fix middleware path segment
1 parent 25e4699 commit 81d12c9

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

crates/service/src/middleware/deployment.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ mod tests {
4949
};
5050

5151
let app = Router::new()
52-
.route("/:deployment_id", get(handle))
52+
.route("/{deployment_id}", get(handle))
5353
.layer(middleware);
5454

5555
let res = app

crates/service/src/service/router.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ impl ServiceRouter {
384384

385385
// data layer
386386
let data_routes = Router::new()
387-
.route("/subgraphs/id/:id", post_request_handler)
387+
.route("/subgraphs/id/{id}", post_request_handler)
388388
.with_state(graphnode_state.clone());
389389

390390
let subgraphs_route = Router::new().nest(&url_prefix, data_routes);
@@ -396,7 +396,7 @@ impl ServiceRouter {
396396
.nest("/escrow", serve_escrow_subgraph)
397397
.nest("/network", serve_network_subgraph)
398398
.route(
399-
"/subgraph/health/:deployment_id",
399+
"/subgraph/health/{deployment_id}",
400400
get(health).with_state(graphnode_state.clone()),
401401
)
402402
.layer(misc_rate_limiter);

docs/Routes.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ This section lists the routes currently exposed by the Subgraph Service. Each ro
2828

2929
| Route | Description |
3030
|--------------------------------------|----------------------------------------------------------------------------------------------|
31-
| `/subgraph/health/:id` | Retrieves the health state of a specified subgraph using its ID. |
32-
| `/subgraphs/id/:id` | Routes a query to a specific subgraph using its ID. Requires a receipt or valid token. |
31+
| `/subgraph/health/{id}` | Retrieves the health state of a specified subgraph using its ID. |
32+
| `/subgraphs/id/{id}` | Routes a query to a specific subgraph using its ID. Requires a receipt or valid token. |
3333

3434
## Node Status Route
3535

0 commit comments

Comments
 (0)