Skip to content

Commit bf97f2d

Browse files
committed
refactor: remove magic constant from request handler
Signed-off-by: Gustavo Inacio <[email protected]>
1 parent 59973bf commit bf97f2d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/service/src/routes/request_handler.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ use reqwest::header::CONTENT_TYPE;
1313
use thegraph_core::DeploymentId;
1414
use tracing::trace;
1515

16+
const GRAPH_ATTESTABLE: &str = "graph-attestable";
17+
1618
pub async fn request_handler(
1719
Path(deployment): Path<DeploymentId>,
1820
State(state): State<SubgraphServiceState>,
@@ -36,7 +38,7 @@ pub async fn request_handler(
3638

3739
let attestable = response
3840
.headers()
39-
.get("graph-attestable")
41+
.get(GRAPH_ATTESTABLE)
4042
.map_or(false, |value| {
4143
value.to_str().map(|value| value == "true").unwrap_or(false)
4244
});

0 commit comments

Comments
 (0)