Skip to content

Commit

Permalink
fix: truncate query from list view
Browse files Browse the repository at this point in the history
they are shown below when verbose anyway
  • Loading branch information
alemidev committed Oct 20, 2024
1 parent b6c7c88 commit 37f4d6b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ impl PrintableResult for ListResult {
}

for (name, endpoint) in collection.route {
let url = endpoint.url(collection.client.as_ref().and_then(|x| x.base.as_deref()));
let url = endpoint.url(collection.client.as_ref().and_then(|x| x.base.as_deref()))
.split('?')
.next()
.unwrap_or_default()
.to_string();
let method = endpoint.method.as_deref().unwrap_or("GET");
println!(" - {name} \t{method} \t{url}");
if ! compact {
Expand Down

0 comments on commit 37f4d6b

Please # to comment.