Skip to content

Commit

Permalink
fix collection slug query
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanniser committed Oct 21, 2024
1 parent 0bd6000 commit 9062360
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ export const getCategory = unstable_cache(
);

export const getCollectionDetails = unstable_cache(
async (collectionName: string) =>
async (collectionSlug: string) =>
db.query.collections.findMany({
with: {
categories: true,
},
where: (collections, { eq }) => eq(collections.name, collectionName),
orderBy: (collections, { asc }) => asc(collections.name),
where: (collections, { eq }) => eq(collections.slug, collectionSlug),
orderBy: (collections, { asc }) => asc(collections.slug),
}),
["collection"],
{
Expand Down

0 comments on commit 9062360

Please sign in to comment.