diff --git a/src/processes/feed_server/endpoints/get_feed_skeleton.rs b/src/processes/feed_server/endpoints/get_feed_skeleton.rs index 79daf1b..5f38687 100644 --- a/src/processes/feed_server/endpoints/get_feed_skeleton.rs +++ b/src/processes/feed_server/endpoints/get_feed_skeleton.rs @@ -18,9 +18,15 @@ pub async fn get_feed_skeleton( State(database): State>, query: Query, ) -> Result, AppError> { + let feed_name = query + .feed + .split('/') + .last() + .ok_or_else(|| anyhow!("Invalid feed URI"))?; + let algo = algos - .get_by_name(&query.feed) - .ok_or_else(|| AppError::FeedNotFound(query.feed.clone()))?; + .get_by_name(feed_name) + .ok_or_else(|| AppError::FeedNotFound(feed_name.to_owned()))?; let limit = query.limit.unwrap_or(20); let earlier_than = query.cursor.as_deref().map(parse_cursor).transpose()?;