BLOG-86 Checking authentication before uploading image #101
1
backend/Cargo.lock
generated
1
backend/Cargo.lock
generated
@ -1664,6 +1664,7 @@ dependencies = [
|
||||
"actix-multipart",
|
||||
"actix-web",
|
||||
"async-trait",
|
||||
"auth",
|
||||
"futures",
|
||||
"log",
|
||||
"serde",
|
||||
|
@ -11,3 +11,5 @@ futures.workspace = true
|
||||
log.workspace = true
|
||||
serde.workspace = true
|
||||
sqlx.workspace = true
|
||||
|
||||
auth.workspace = true
|
||||
|
@ -1,5 +1,6 @@
|
||||
use actix_multipart::Multipart;
|
||||
use actix_web::{HttpResponse, Responder, web};
|
||||
use auth::framework::web::auth_middleware::UserId;
|
||||
use futures::StreamExt;
|
||||
|
||||
use crate::{
|
||||
@ -18,6 +19,7 @@ pub fn configure_image_routes(cfg: &mut web::ServiceConfig) {
|
||||
async fn upload_image_handler(
|
||||
image_controller: web::Data<dyn ImageController>,
|
||||
mut payload: Multipart,
|
||||
_: UserId,
|
||||
) -> impl Responder {
|
||||
let mut image_request_dto: Option<ImageRequestDto> = None;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user