WIP: improve search #1
|
@ -26,29 +26,29 @@ const DEFAULT_SIZE: usize = 25;
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, Deserialize)]
|
#[derive(Copy, Clone, Debug, Deserialize)]
|
||||||
enum SortKey {
|
enum SortKey {
|
||||||
Name,
|
Name,
|
||||||
Size,
|
Size,
|
||||||
Seeds,
|
Seeds,
|
||||||
Leeches,
|
Leeches,
|
||||||
Scraped,
|
Scraped,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for SortKey {
|
impl Default for SortKey {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self::Scraped
|
Self::Scraped
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, Deserialize)]
|
#[derive(Copy, Clone, Debug, Deserialize)]
|
||||||
enum SortDirection {
|
enum SortDirection {
|
||||||
Asc,
|
Asc,
|
||||||
Desc,
|
Desc,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for SortDirection {
|
impl Default for SortDirection {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self::Desc
|
Self::Desc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::main]
|
#[actix_rt::main]
|
||||||
|
|
Loading…
Reference in New Issue