Implement all API according to swagger spec #27
|
@ -2,7 +2,6 @@
|
|||
use std::error::Error;
|
||||
|
||||
use redis::{Client, Commands, AsyncCommands, Connection};
|
||||
use tokio::task::JoinSet;
|
||||
|
||||
use crate::env::Env;
|
||||
|
||||
|
|
|
@ -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<Extract = impl Reply, Error = Rejection> + Clone {
|
||||
|
|
|
@ -48,7 +48,6 @@ pub async fn get_all(state: SharedState, ip: Option<IpAddr>) -> Result<Box<dyn R
|
|||
|x| {
|
||||
if let Some(owner) = x.uploader_ip {
|
||||
if let Some(caller) = ip {
|
||||
println!("{owner} {caller}");
|
||||
return owner == caller
|
||||
blek marked this conversation as resolved
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
looks like a leftover debug statement