Enhance tags
This commit is contained in:
@ -9,7 +9,7 @@ export type ArtworkListParams = {
|
||||
};
|
||||
|
||||
export async function getArtworksPage(params: ArtworkListParams) {
|
||||
const { published = "all", take = 48, cursor } = params;
|
||||
const { published = "all", cursor, take = 48 } = params;
|
||||
|
||||
const where: Prisma.ArtworkWhereInput = {};
|
||||
|
||||
@ -21,8 +21,13 @@ export async function getArtworksPage(params: ArtworkListParams) {
|
||||
where,
|
||||
include: {
|
||||
file: true,
|
||||
variants: true,
|
||||
gallery: true,
|
||||
metadata: true,
|
||||
albums: true,
|
||||
categories: true,
|
||||
colors: true,
|
||||
tags: true,
|
||||
variants: true,
|
||||
},
|
||||
orderBy: [{ createdAt: "desc" }, { id: "asc" }],
|
||||
take: take + 1, // fetch one extra to know if there is a next page
|
||||
|
||||
Reference in New Issue
Block a user