feat: Add related notes functionality with new API endpoint and frontend components, and update note search route.
This commit is contained in:
@@ -30,4 +30,7 @@ pub trait LinkRepository: Send + Sync {
|
||||
|
||||
/// Delete existing links for a specific source note (e.g., before regenerating).
|
||||
async fn delete_links_for_source(&self, source_note_id: Uuid) -> DomainResult<()>;
|
||||
|
||||
/// Get links for a specific source note.
|
||||
async fn get_links_for_note(&self, source_note_id: Uuid) -> DomainResult<Vec<NoteLink>>;
|
||||
}
|
||||
|
||||
@@ -406,6 +406,14 @@ impl SmartNoteService {
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Get related notes for a given note ID
|
||||
pub async fn get_related_notes(
|
||||
&self,
|
||||
note_id: Uuid,
|
||||
) -> DomainResult<Vec<crate::entities::NoteLink>> {
|
||||
self.link_repo.get_links_for_note(note_id).await
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user