From 9d70eeae618a5f843c760bdf19e9ae2362a6f138 Mon Sep 17 00:00:00 2001 From: Bat Date: Fri, 12 Oct 2018 20:48:11 +0100 Subject: [PATCH] Don't register the media serving route (they are now served with other static files) And remove some unused imports --- src/main.rs | 1 - src/routes/medias.rs | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index d2b186d7..691f0c34 100644 --- a/src/main.rs +++ b/src/main.rs @@ -100,7 +100,6 @@ fn main() { routes::medias::details, routes::medias::delete, routes::medias::set_avatar, - routes::medias::static_files, routes::notifications::paginated_notifications, routes::notifications::notifications, diff --git a/src/routes/medias.rs b/src/routes/medias.rs index ce40c42b..87b00e91 100644 --- a/src/routes/medias.rs +++ b/src/routes/medias.rs @@ -1,9 +1,9 @@ use guid_create::GUID; use multipart::server::{Multipart, save::{SavedData, SaveResult}}; -use rocket::{Data, http::ContentType, response::{NamedFile, Redirect}}; +use rocket::{Data, http::ContentType, response::Redirect}; use rocket_contrib::Template; use serde_json; -use std::{fs, path::{Path, PathBuf}}; +use std::fs; use plume_models::{db_conn::DbConn, medias::*, users::User}; #[get("/medias")]