Move list_photos to files module
All checks were successful
Core Repos/ImageApi/pipeline/pr-master This commit looks good

Added some tests, refactored the error handling/logging, and refactored
the extension tests.
This commit is contained in:
Cameron Cordes
2021-10-07 20:28:34 -04:00
parent 2c50b4ae2f
commit d6e4a01c88
3 changed files with 200 additions and 102 deletions

View File

@@ -1,5 +1,7 @@
use std::{fs, str::FromStr};
use anyhow::{anyhow, Context};
use chrono::{DateTime, Utc};
use log::error;
@@ -78,10 +80,10 @@ impl FromRequest for Claims {
}
}
#[derive(Serialize)]
pub struct PhotosResponse<'a> {
pub photos: &'a [String],
pub dirs: &'a [String],
#[derive(Serialize, Deserialize, Debug)]
pub struct PhotosResponse {
pub photos: Vec<String>,
pub dirs: Vec<String>,
}
#[derive(Deserialize)]