Skip to content

Commit f0b60bd

Browse files
committed
chore: remove unused method
1 parent 1ae3416 commit f0b60bd

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

graph/src/data/query/result.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -189,26 +189,14 @@ impl QueryResults {
189189
self.results.push(other);
190190
}
191191

192-
fn has_query_parameter(&self, query: Option<&str>) -> bool {
193-
if let Some(query_str) = query {
194-
for param in query_str.split('&') {
195-
let param_parts: Vec<&str> = param.splitn(2, '=').collect();
196-
if param_parts.len() == 2 && param_parts[0] == "query" {
197-
return true;
198-
}
199-
}
200-
}
201-
false
202-
}
203-
204192
pub fn as_http_response<T: From<String>>(&self) -> http::Response<T> {
205193
let status_code = http::StatusCode::OK;
206194

207195
let json =
208196
serde_json::to_string(self).expect("Failed to serialize GraphQL response to JSON");
209197

210198
http::Response::builder()
211-
.status(StatusCode::BAD_REQUEST)
199+
.status(status_code)
212200
.header(ACCESS_CONTROL_ALLOW_ORIGIN, "*")
213201
.header(ACCESS_CONTROL_ALLOW_HEADERS, "Content-Type, User-Agent")
214202
.header(ACCESS_CONTROL_ALLOW_METHODS, "GET, OPTIONS, POST")

0 commit comments

Comments
 (0)