From f68390302f945ce7b0b714885ee9b45c6e54f33e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20St=C3=BCrmer?= Date: Fri, 27 Oct 2023 06:30:59 +0200 Subject: [PATCH] adjust imports --- crates/media/src/api/routes/post_media.rs | 5 +---- crates/media/src/api/routes/post_media_id.rs | 5 ----- crates/media/src/repository.rs | 3 --- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/crates/media/src/api/routes/post_media.rs b/crates/media/src/api/routes/post_media.rs index e193a18..8a209f3 100644 --- a/crates/media/src/api/routes/post_media.rs +++ b/crates/media/src/api/routes/post_media.rs @@ -20,12 +20,10 @@ use axum::{ extract::{Multipart, State}, http::StatusCode, - response::{IntoResponse, Redirect, Response}, + response::{IntoResponse, Redirect}, Json, }; use common::auth::user::User; -use hyper::header::LOCATION; -use hyper::HeaderMap; use serde::{Deserialize, Serialize}; use time::format_description::well_known::Rfc3339; use time::OffsetDateTime; @@ -48,7 +46,6 @@ pub(crate) async fn post_media( let mut name = None; let mut date_taken = None; - let mut headers = HeaderMap::new(); while let Some(field) = multipart.next_field().await.unwrap() { if let Some(field_name) = field.name() { diff --git a/crates/media/src/api/routes/post_media_id.rs b/crates/media/src/api/routes/post_media_id.rs index 1955f1d..54373a9 100644 --- a/crates/media/src/api/routes/post_media_id.rs +++ b/crates/media/src/api/routes/post_media_id.rs @@ -18,15 +18,10 @@ //! Add files for a specific media item //! -use core::panic; - use axum::extract::{Multipart, Path, State}; use axum::http::StatusCode; use axum::response::{IntoResponse, Redirect}; use common::auth::user::User; -use hyper::header::LOCATION; -use hyper::HeaderMap; -use tempfile::tempfile; use tracing::{debug, info}; use uuid::Uuid; diff --git a/crates/media/src/repository.rs b/crates/media/src/repository.rs index d953790..9d414f0 100644 --- a/crates/media/src/repository.rs +++ b/crates/media/src/repository.rs @@ -22,14 +22,11 @@ use bytes::Bytes; use common::config::configuration::Configuration; use common::database::reference::Reference; use common::database::Database; -use core::ffi::FromBytesUntilNulError; use database::sqlite::SqliteDatabase; use std::fs; use std::path::Path; use std::sync::Arc; use time::OffsetDateTime; -use tokio::fs::File; -use tokio::io::AsyncWriteExt; use tracing::log::warn; use tracing::{debug, info}; use uuid::Uuid;