Skip to content

Commit

Permalink
fix usePostByUri
Browse files Browse the repository at this point in the history
  • Loading branch information
vernaillen committed Apr 25, 2024
1 parent 695df6a commit a9c5bab
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/runtime/composables/usePosts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ const _useLatestPost = async (): Promise<Post> => {

const _usePostByUri = async (uri: string): Promise<Post> => {
if (!uri || uri === 'undefined' || uri === '_nuxt' || uri === '__nuxt') return
const { data } = await getContentNode<Post>('PostByUri', 'nodeByUri', {
return await getContentNode<Post>('PostByUri', 'nodeByUri', {
uri: uri,
})
return data.data
}

const _usePostById = async (id: number, asPreview?: boolean): Promise<Post> => {
Expand Down

0 comments on commit a9c5bab

Please sign in to comment.