fix: correct struct name from GetPostIdBySemanticIdUseCaseImpl to GetPostBySemanticIdUseCaseImpl
Some checks failed
Frontend CI / build (push) Successful in 1m21s
PR Title Check / pr-title-check (pull_request) Failing after 17s

This commit is contained in:
SquidSpirit 2025-10-12 17:43:21 +08:00
parent c0fe4585ba
commit 9862850d28
2 changed files with 5 additions and 5 deletions

View File

@ -15,12 +15,12 @@ pub trait GetPostBySemanticIdUseCase: Send + Sync {
async fn execute(&self, semantic_id: &str, user_id: Option<i32>) -> Result<Post, PostError>; 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>, post_repository: Arc<dyn PostRepository>,
get_post_by_id_use_case: Arc<dyn GetPostByIdUseCase>, get_post_by_id_use_case: Arc<dyn GetPostByIdUseCase>,
} }
impl GetPostIdBySemanticIdUseCaseImpl { impl GetPostBySemanticIdUseCaseImpl {
pub fn new( pub fn new(
post_repository: Arc<dyn PostRepository>, post_repository: Arc<dyn PostRepository>,
get_post_by_id_use_case: Arc<dyn GetPostByIdUseCase>, get_post_by_id_use_case: Arc<dyn GetPostByIdUseCase>,
@ -33,7 +33,7 @@ impl GetPostIdBySemanticIdUseCaseImpl {
} }
#[async_trait] #[async_trait]
impl GetPostBySemanticIdUseCase for GetPostIdBySemanticIdUseCaseImpl { impl GetPostBySemanticIdUseCase for GetPostBySemanticIdUseCaseImpl {
async fn execute(&self, semantic_id: &str, user_id: Option<i32>) -> Result<Post, PostError> { async fn execute(&self, semantic_id: &str, user_id: Option<i32>) -> Result<Post, PostError> {
let id = self let id = self
.post_repository .post_repository

View File

@ -40,7 +40,7 @@ use post::{
get_all_labels_use_case::GetAllLabelsUseCaseImpl, get_all_labels_use_case::GetAllLabelsUseCaseImpl,
get_all_post_info_use_case::GetAllPostInfoUseCaseImpl, get_all_post_info_use_case::GetAllPostInfoUseCaseImpl,
get_post_by_id_use_case::GetFullPostUseCaseImpl, 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, update_label_use_case::UpdateLabelUseCaseImpl, update_post_use_case::UpdatePostUseCaseImpl,
}, },
framework::db::{ framework::db::{
@ -98,7 +98,7 @@ impl Container {
Arc::new(GetAllPostInfoUseCaseImpl::new(post_repository.clone())); Arc::new(GetAllPostInfoUseCaseImpl::new(post_repository.clone()));
let get_post_by_id_use_case = let get_post_by_id_use_case =
Arc::new(GetFullPostUseCaseImpl::new(post_repository.clone())); 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(), post_repository.clone(),
get_post_by_id_use_case.clone(), get_post_by_id_use_case.clone(),
)); ));