diff --git a/src/api/handlers/collection/store_collection_api_handler.rs b/src/api/handlers/collection/store_collection_api_handler.rs index 6869338..c3d1e0c 100644 --- a/src/api/handlers/collection/store_collection_api_handler.rs +++ b/src/api/handlers/collection/store_collection_api_handler.rs @@ -1,6 +1,3 @@ -use std::sync::Arc; -use axum::{Extension, Json}; -use axum::extract::State; use crate::api::handlers::collection::request::store_collection_request::StoreCollectionRequest; use crate::avored_state::AvoRedState; use crate::error::{Error, Result}; @@ -8,8 +5,11 @@ use crate::models::collection_model::{CollectionModel, CreatableCollection}; use crate::models::token_claim_model::LoggedInUser; use crate::models::validation_error::ErrorResponse; use crate::responses::ApiResponse; +use axum::extract::State; +use axum::{Extension, Json}; +use std::sync::Arc; -pub async fn store_collection_api_handler ( +pub async fn store_collection_api_handler( state: State>, Extension(logged_in_user): Extension, Json(payload): Json, @@ -51,4 +51,4 @@ pub async fn store_collection_api_handler ( }; Ok(Json(response)) -} \ No newline at end of file +} diff --git a/src/api/handlers/collection/update_collection_api_handler.rs b/src/api/handlers/collection/update_collection_api_handler.rs index 4f1c0d3..05c9c10 100644 --- a/src/api/handlers/collection/update_collection_api_handler.rs +++ b/src/api/handlers/collection/update_collection_api_handler.rs @@ -1,6 +1,3 @@ -use std::sync::Arc; -use axum::{Extension, Json}; -use axum::extract::{Path, State}; use crate::api::handlers::collection::request::update_collection_request::UpdateCollectionRequest; use crate::avored_state::AvoRedState; use crate::error::{Error, Result}; @@ -8,8 +5,11 @@ use crate::models::collection_model::{CollectionModel, UpdatableCollection}; use crate::models::token_claim_model::LoggedInUser; use crate::models::validation_error::ErrorResponse; use crate::responses::ApiResponse; +use axum::extract::{Path, State}; +use axum::{Extension, Json}; +use std::sync::Arc; -pub async fn update_collection_api_handler ( +pub async fn update_collection_api_handler( state: State>, Path(collection_id): Path, Extension(logged_in_user): Extension, @@ -52,4 +52,4 @@ pub async fn update_collection_api_handler ( }; Ok(Json(response)) -} \ No newline at end of file +}