cli + query: improvements

This commit is contained in:
nym21
2025-03-02 20:15:01 +01:00
parent ceefc8ffc6
commit be2012f28d
15 changed files with 308 additions and 137 deletions

View File

@@ -122,6 +122,7 @@ fn req_to_response_res(
csv.into_response()
}
Some(Format::MD) => "".into_response(),
Some(Format::JSON) | None => {
if values.len() == 1 {
let values = values.first().unwrap();
@@ -147,6 +148,7 @@ fn req_to_response_res(
headers.insert_content_disposition_attachment();
match format {
Format::CSV => headers.insert_content_type_text_csv(),
Format::MD => headers.insert_content_type_text_plain(),
Format::TSV => headers.insert_content_type_text_tsv(),
Format::JSON => headers.insert_content_type_application_json(),
}