Commit 799847b9 authored by lorenzo's avatar lorenzo

order search by votes. Clean search request

parent a589132f
......@@ -37,11 +37,14 @@ pub struct StationRequest {
impl StationRequest {
pub fn search_for_name(name: &str, limit: u32) -> Self {
let mut search = Self::default(); = Some(name.to_string());
search.limit = Some(limit);
search.hidebroken = Some(true);
Self {
name: Some(name.to_string()),
limit: Some(limit),
hidebroken: Some(true),
order: Some(String::from("votes")),
reverse: Some(true),
pub fn url_encode(&self) -> String {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment