Update Photos API
Since there is a body to the photos api it should be a post for now. Also updated the response to separate files and directories.
This commit is contained in:
@@ -9,7 +9,9 @@ pub fn list_files(dir: PathBuf) -> io::Result<Vec<PathBuf>> {
|
||||
.filter(|entry| is_image_or_video(&entry.path()) || entry.file_type().unwrap().is_dir())
|
||||
.map(|entry| entry.path())
|
||||
.map(|path: PathBuf| {
|
||||
let relative = path.strip_prefix(dotenv::var("BASE_PATH").unwrap()).unwrap();
|
||||
let relative = path
|
||||
.strip_prefix(dotenv::var("BASE_PATH").unwrap())
|
||||
.unwrap();
|
||||
relative.to_path_buf()
|
||||
})
|
||||
.collect::<Vec<PathBuf>>();
|
||||
|
||||
Reference in New Issue
Block a user