mirror of
https://github.com/ProjectSegfault/website.git
synced 2024-06-28 23:53:20 +05:30
11 lines
272 B
TypeScript
11 lines
272 B
TypeScript
import type { PageServerLoad } from "./$types";
|
|
import fetchApi from "$lib/ghost";
|
|
|
|
export const load: PageServerLoad = async ({ params }) => {
|
|
const data = await fetchApi("posts", "&filter=tags:" + params.tag);
|
|
|
|
return {
|
|
posts: data.posts,
|
|
tagName: params.tag
|
|
}
|
|
}; |