Skip to content

Commit

Permalink
add publishedAt to all posts query
Browse files Browse the repository at this point in the history
  • Loading branch information
drewlyton committed Jan 15, 2024
1 parent ef7bd5d commit 98b34d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/data/sanityClient.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function getPostsByTag(tags: string[]) {
}

export function getAllPosts() {
return `*[_type == "post"]{_id, title, description, mainImage, tags[]->{title}, "slug": slug.current}`;
return `*[_type == "post"]{_id, title, description, mainImage, tags[]->{title}, "slug": slug.current, publishedAt}`;
}

export function getPostsFeed() {
Expand Down

0 comments on commit 98b34d5

Please sign in to comment.