fix: piefed page cursor types won't work

This commit is contained in:
Xylight committed 2025-09-21 20:51:48 -07:00
1 parent 9a27e95a5f
commit 7f9d8c6f86
11 files changed
+504 -66

No files matched your search

+8 -5
View File
@@ -14,11 +14,14 @@ export async function load({ url, fetch, route }) {
const listingType: ListingType =
(url.searchParams.get('type') as ListingType) || settings.defaultSort.feed
const feedData = feed(route.id, async (params) => ({
...(await client({ func: fetch }).getPosts(params)),
params: params,
client: {},
})).load({
const feedData = feed(route.id, async (params) => {
const posts = await client({ func: fetch }).getPosts(params)
return {
...posts,
params: { ...params, page_cursor: posts.next_page },
client: {},
}
}).load({
page_cursor: cursor,
sort: sort,
type_: listingType,