Use PhotoSize enum in file requests

This commit is contained in:
Cameron Cordes
2024-06-30 17:49:55 -04:00
parent a403903807
commit 9a486b3f66
2 changed files with 21 additions and 12 deletions

View File

@@ -103,7 +103,8 @@ pub struct PhotosResponse {
#[derive(Deserialize)]
pub struct FilesRequest {
pub path: String,
pub tag_ids: Option<String>, // comma separated numbers
// comma separated numbers
pub tag_ids: Option<String>,
pub tag_filter_mode: Option<FilterMode>,
pub recursive: Option<bool>,
}
@@ -114,10 +115,17 @@ pub enum FilterMode {
All,
}
#[derive(Copy, Clone, Deserialize, PartialEq, Debug)]
#[serde(rename_all = "lowercase")]
pub enum PhotoSize {
Full,
Thumb,
}
#[derive(Deserialize)]
pub struct ThumbnailRequest {
pub path: String,
pub size: Option<String>,
pub size: Option<PhotoSize>,
}
#[derive(Deserialize)]