diff --git a/filed/src/web/api.rs b/filed/src/web/api.rs index 3b3c255..d07602b 100644 --- a/filed/src/web/api.rs +++ b/filed/src/web/api.rs @@ -1,11 +1,11 @@ use warp::{reply::Reply, reject::Rejection, Filter}; use serde::{Serialize, Deserialize}; -use self::get_all::get_all_f; +use self::files::get_all::get_all_f; use super::state::SharedState; -mod get_all; +mod files; mod types; #[derive(Debug, Clone, Serialize, Deserialize)] diff --git a/filed/src/web/api/files.rs b/filed/src/web/api/files.rs new file mode 100644 index 0000000..2cc462a --- /dev/null +++ b/filed/src/web/api/files.rs @@ -0,0 +1 @@ +pub mod get_all; \ No newline at end of file diff --git a/filed/src/web/api/get_all.rs b/filed/src/web/api/files/get_all.rs similarity index 88% rename from filed/src/web/api/get_all.rs rename to filed/src/web/api/files/get_all.rs index 6b4286c..e4d5b08 100644 --- a/filed/src/web/api/get_all.rs +++ b/filed/src/web/api/files/get_all.rs @@ -2,14 +2,14 @@ use warp::{reply::{Reply, json}, reject::Rejection, Filter, http::StatusCode}; use crate::web::{state::SharedState, rejection::HttpReject}; -use super::types::ErrorMessage; +use super::super::types::{ErrorMessage, Error}; pub async fn get_all(state: SharedState) -> Result, Rejection> { if ! state.config.api.enabled { return Ok( Box::new( warp::reply::with_status( - json(&ErrorMessage::new(super::types::Error::APIDisabled)), + json(&ErrorMessage::new(Error::APIDisabled)), StatusCode::SERVICE_UNAVAILABLE ) )