structural refactor and codebase improvements
This commit is contained in:
17
crates/application/src/social/get_relation.rs
Normal file
17
crates/application/src/social/get_relation.rs
Normal file
@@ -0,0 +1,17 @@
|
||||
use domain::{
|
||||
errors::DomainError,
|
||||
value_objects::{FollowRelation, SocialIdentity, UserId},
|
||||
};
|
||||
use uuid::Uuid;
|
||||
|
||||
use super::deps::SocialQueryDeps;
|
||||
|
||||
pub async fn execute(
|
||||
deps: &SocialQueryDeps,
|
||||
viewer_id: Uuid,
|
||||
target: SocialIdentity,
|
||||
) -> Result<FollowRelation, DomainError> {
|
||||
deps.follow_graph
|
||||
.get_relation(&UserId::from_uuid(viewer_id), &target)
|
||||
.await
|
||||
}
|
||||
Reference in New Issue
Block a user