Skip to content

Commit a5f0c86

Browse files
committed
feat: response header
1 parent f380b8b commit a5f0c86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

frameworks/Rust/hyperlane/src/route.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub async fn json(controller_data: ControllerData) {
1111

1212
pub async fn plaintext(controller_data: ControllerData) {
1313
let _ = controller_data
14-
.set_request_header(CONTENT_TYPE, TEXT_PLAIN)
14+
.set_response_header(CONTENT_TYPE, TEXT_PLAIN)
1515
.await
1616
.set_response_body(RESPONSEDATA)
1717
.await;
@@ -29,7 +29,7 @@ pub async fn queries(controller_data: ControllerData) {
2929
.get_request_query("q")
3030
.await
3131
.map(|queries| queries.parse::<Queries>().unwrap_or_default())
32-
.unwrap_or(0)
32+
.unwrap_or(1)
3333
.min(ROW_LIMIT as usize);
3434
let mut data: Vec<QueryRow> = Vec::with_capacity(queries);
3535
for _ in 0..queries {

0 commit comments

Comments
 (0)