Implement all API according to swagger spec #27

Merged
blek merged 16 commits from delete-upload-api-methods into 0.2-dev 2023-12-14 11:56:46 +01:00
3 changed files with 2 additions and 3 deletions
Showing only changes of commit 589ff7b040 - Show all commits

View File

@ -2,7 +2,6 @@
use std::error::Error;
use redis::{Client, Commands, AsyncCommands, Connection};
use tokio::task::JoinSet;
use crate::env::Env;

View File

@ -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 {

View File

@ -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
Review

looks like a leftover debug statement

looks like a leftover debug statement
}
}