diff --git a/src/main.rs b/src/main.rs index 958af4e..7718412 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,14 +17,10 @@ use actix_multipart as mp; use actix_web::{ delete, error::BlockingError, - get, post, put, - web::{self, BufMut, BytesMut}, + get, middleware, post, put, + web::{self, BufMut, BytesMut, HttpRequest, HttpResponse, Query}, App, HttpServer, Responder, }; -use actix_web::{ - middleware, - web::{HttpRequest, HttpResponse, Json}, -}; use notify::{watcher, DebouncedEvent, RecursiveMode, Watcher}; use rayon::prelude::*; use serde::Serialize; @@ -42,8 +38,8 @@ mod database; mod files; mod video; -#[post("/photos")] -async fn list_photos(_claims: Claims, req: Json) -> impl Responder { +#[get("/photos")] +async fn list_photos(_claims: Claims, req: Query) -> impl Responder { info!("{}", req.path); let path = &req.path;