fix: correct struct name from GetPostIdBySemanticIdUseCaseImpl to GetPostBySemanticIdUseCaseImpl
This commit is contained in:
parent
c0fe4585ba
commit
9862850d28
@ -15,12 +15,12 @@ pub trait GetPostBySemanticIdUseCase: Send + Sync {
|
||||
async fn execute(&self, semantic_id: &str, user_id: Option<i32>) -> Result<Post, PostError>;
|
||||
}
|
||||
|
||||
pub struct GetPostIdBySemanticIdUseCaseImpl {
|
||||
pub struct GetPostBySemanticIdUseCaseImpl {
|
||||
post_repository: Arc<dyn PostRepository>,
|
||||
get_post_by_id_use_case: Arc<dyn GetPostByIdUseCase>,
|
||||
}
|
||||
|
||||
impl GetPostIdBySemanticIdUseCaseImpl {
|
||||
impl GetPostBySemanticIdUseCaseImpl {
|
||||
pub fn new(
|
||||
post_repository: Arc<dyn PostRepository>,
|
||||
get_post_by_id_use_case: Arc<dyn GetPostByIdUseCase>,
|
||||
@ -33,7 +33,7 @@ impl GetPostIdBySemanticIdUseCaseImpl {
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl GetPostBySemanticIdUseCase for GetPostIdBySemanticIdUseCaseImpl {
|
||||
impl GetPostBySemanticIdUseCase for GetPostBySemanticIdUseCaseImpl {
|
||||
async fn execute(&self, semantic_id: &str, user_id: Option<i32>) -> Result<Post, PostError> {
|
||||
let id = self
|
||||
.post_repository
|
||||
|
@ -40,7 +40,7 @@ use post::{
|
||||
get_all_labels_use_case::GetAllLabelsUseCaseImpl,
|
||||
get_all_post_info_use_case::GetAllPostInfoUseCaseImpl,
|
||||
get_post_by_id_use_case::GetFullPostUseCaseImpl,
|
||||
get_post_by_semantic_id_use_case::GetPostIdBySemanticIdUseCaseImpl,
|
||||
get_post_by_semantic_id_use_case::GetPostBySemanticIdUseCaseImpl,
|
||||
update_label_use_case::UpdateLabelUseCaseImpl, update_post_use_case::UpdatePostUseCaseImpl,
|
||||
},
|
||||
framework::db::{
|
||||
@ -98,7 +98,7 @@ impl Container {
|
||||
Arc::new(GetAllPostInfoUseCaseImpl::new(post_repository.clone()));
|
||||
let get_post_by_id_use_case =
|
||||
Arc::new(GetFullPostUseCaseImpl::new(post_repository.clone()));
|
||||
let get_post_by_semantic_id_use_case = Arc::new(GetPostIdBySemanticIdUseCaseImpl::new(
|
||||
let get_post_by_semantic_id_use_case = Arc::new(GetPostBySemanticIdUseCaseImpl::new(
|
||||
post_repository.clone(),
|
||||
get_post_by_id_use_case.clone(),
|
||||
));
|
||||
|
Loading…
x
Reference in New Issue
Block a user