Add sorting shuffle, and name asc/desc
This commit is contained in:
@@ -100,6 +100,14 @@ pub struct PhotosResponse {
|
||||
pub dirs: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Deserialize, PartialEq, Debug)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub enum SortType {
|
||||
Shuffle,
|
||||
NameAsc,
|
||||
NameDesc,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct FilesRequest {
|
||||
pub path: String,
|
||||
@@ -107,6 +115,7 @@ pub struct FilesRequest {
|
||||
pub tag_ids: Option<String>,
|
||||
pub tag_filter_mode: Option<FilterMode>,
|
||||
pub recursive: Option<bool>,
|
||||
pub sort: Option<SortType>,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Deserialize, PartialEq, Debug)]
|
||||
|
||||
Reference in New Issue
Block a user