Skip to content

Commit

Permalink
fix composable
Browse files Browse the repository at this point in the history
  • Loading branch information
Etienne Moureton committed Mar 15, 2024
1 parent 5c130a0 commit 02cbf72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/runtime/composables/useWpPost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ const useWpPost = async ({ type = 'posts', id }: Options = {}) => {
const query = id || route.path.substring(1)

const { data, error } = await useAsyncData<Array<Post>>('post', async () => {
const { apiEndpoint, additonnalQueryParams } = useRuntimeConfig().public.wordpress
const { apiEndpoint } = useRuntimeConfig().public.wordpress

return $fetch(`${apiEndpoint}/${type}/${query}${additonnalQueryParams}`)
return $fetch(`${apiEndpoint}/${type}/${query}`)
})

if(error.value) {
Expand Down

0 comments on commit 02cbf72

Please sign in to comment.