Add filtering by Tag to /images endpoint

This commit is contained in:
Cameron Cordes
2023-03-20 08:14:12 -04:00
parent de4041bd17
commit 7d05c9b8bf
3 changed files with 41 additions and 9 deletions

View File

@@ -100,6 +100,19 @@ pub struct PhotosResponse {
pub dirs: Vec<String>,
}
#[derive(Deserialize)]
pub struct FilesRequest {
pub path: String,
pub tag_ids: Option<Vec<i32>>,
pub tag_filter_mode: Option<FilterMode>,
}
#[derive(Copy, Clone, Deserialize)]
pub enum FilterMode {
Any,
All,
}
#[derive(Deserialize)]
pub struct ThumbnailRequest {
pub path: String,