import { PRIVATE_WP_URL } from '$env/static/private';
interface GetPostParams {
authorId?: number
categorySlug?: string
orderBy?: string
limit?: number
offset?: number
order?: string
lang: string
}
export const getPosts = async (params: GetPostParams) => await fetch(`${PRIVATE_WP_URL}/wp-json/api/v1/posts`, {
method: 'POST',
headers: {
'content-type': 'Application/json',
},
body: JSON.stringify(params),
});