diff --git a/filed/src/files/lookup.rs b/filed/src/files/lookup.rs index 736980c..0af43d8 100644 --- a/filed/src/files/lookup.rs +++ b/filed/src/files/lookup.rs @@ -2,7 +2,6 @@ use std::error::Error; use redis::{Client, Commands, AsyncCommands, Connection}; -use tokio::task::JoinSet; use crate::env::Env; diff --git a/filed/src/web/api/files/delete.rs b/filed/src/web/api/files/delete.rs index b10b67e..05da341 100644 --- a/filed/src/web/api/files/delete.rs +++ b/filed/src/web/api/files/delete.rs @@ -1,5 +1,6 @@ use std::{collections::HashMap, net::IpAddr}; +use serde_json::json; use warp::{reply::{Reply, json, with_status}, reject::Rejection, Filter, http::StatusCode}; use serde::{Serialize, Deserialize}; use warp_real_ip::real_ip; @@ -106,7 +107,7 @@ pub async fn delete(state: SharedState, body: DeleteFunctionPayload, ip: Option< file.delete(state).await; - Ok(Box::new(json(&HashMap::<(), ()>::new()))) + Ok(Box::new(json(&json!({})))) } pub fn delete_f(state: SharedState) -> impl Filter + Clone { diff --git a/filed/src/web/api/files/get_all.rs b/filed/src/web/api/files/get_all.rs index 9502139..fb77e72 100644 --- a/filed/src/web/api/files/get_all.rs +++ b/filed/src/web/api/files/get_all.rs @@ -48,7 +48,6 @@ pub async fn get_all(state: SharedState, ip: Option) -> Result