diff --git a/src/pages/artist.rs b/src/pages/artist.rs index 349b634..a794d4f 100644 --- a/src/pages/artist.rs +++ b/src/pages/artist.rs @@ -151,3 +151,28 @@ fn RelatedArtists(#[prop(into)] artist_id: MaybeSignal) -> impl IntoView { } } + +pub async fn get_artist_by_id(artist_id: i32) -> Result, NoCustomError> { + // todo + Ok(Some(Artist { + id: Some(artist_id), + name: "Example Artist".to_string(), + bio: Some("A great artist!".to_string()), + })) +} + +pub async fn get_related_artists(artist_id: i32) -> Result, NoCustomError> { + // todo + Ok(vec![ + Artist { + id: Some(artist_id + 1), + name: "Related Artist 1".to_string(), + bio: None, + }, + Artist { + id: Some(artist_id + 2), + name: "Related Artist 2".to_string(), + bio: None, + }, + ]) +} \ No newline at end of file