fix "hasNextPage"

This commit is contained in:
Simon
2025-06-15 08:48:13 +00:00
parent c34d6dcc14
commit 842db68c57

View File

@@ -328,6 +328,12 @@ async fn videos_post(
.get_videos(cache.get_ref().clone(), pool.get_ref().clone(), channel.clone(), sort.clone(), query.clone(), page.to_string(), perPage.to_string(), featured.clone()) .get_videos(cache.get_ref().clone(), pool.get_ref().clone(), channel.clone(), sort.clone(), query.clone(), page.to_string(), perPage.to_string(), featured.clone())
.await; .await;
videos.items = video_items.clone(); videos.items = video_items.clone();
if video_items.len() == 0 {
videos.pageInfo = PageInfo {
hasNextPage: false,
resultsPerPage: 10,
}
}
//### //###
let next_page = page.to_string().parse::<i32>().unwrap_or(1) + 1; let next_page = page.to_string().parse::<i32>().unwrap_or(1) + 1;
let provider_clone = provider.clone(); let provider_clone = provider.clone();