fix: use sveltekit fetch function
This commit is contained in:
1 parent
7d2089be0e
commit
c0eb89cbbf
2 files changed
+5
-4
No files matched your search
+3
-3
@@ -18,7 +18,6 @@ export async function load({ url, fetch }) {
|
|||||||
const listingType: ListingType =
|
const listingType: ListingType =
|
||||||
(url.searchParams.get('type') as ListingType) || settings.defaultSort.feed
|
(url.searchParams.get('type') as ListingType) || settings.defaultSort.feed
|
||||||
|
|
||||||
|
|
||||||
return await postFeed({
|
return await postFeed({
|
||||||
id: 'main',
|
id: 'main',
|
||||||
request: {
|
request: {
|
||||||
@@ -26,8 +25,9 @@ export async function load({ url, fetch }) {
|
|||||||
sort: sort,
|
sort: sort,
|
||||||
type_: listingType,
|
type_: listingType,
|
||||||
limit: 20,
|
limit: 20,
|
||||||
show_hidden: settings.posts.showHidden
|
show_hidden: settings.posts.showHidden,
|
||||||
},
|
},
|
||||||
url: url
|
url: url,
|
||||||
|
fetch: fetch,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -22,6 +22,7 @@ export async function load({ params, fetch, url }) {
|
|||||||
sort: sort,
|
sort: sort,
|
||||||
limit: 20,
|
limit: 20,
|
||||||
community_name: params.name,
|
community_name: params.name,
|
||||||
}
|
},
|
||||||
|
fetch: fetch,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user