test commit
This commit is contained in:
Binary file not shown.
@@ -74,7 +74,7 @@ export async function registerAdminOrderRoutes(fastify) {
|
||||
where: { id },
|
||||
include: {
|
||||
user: {
|
||||
select: { id: true, email: true, displayName: true, avatar: true, avatarType: true, avatarStyle: true },
|
||||
select: { id: true, email: true, displayName: true, avatar: true, avatarStyle: true },
|
||||
},
|
||||
items: true,
|
||||
messages: { orderBy: { createdAt: 'asc' } },
|
||||
|
||||
@@ -34,7 +34,6 @@ export async function registerAdminUserRoutes(fastify) {
|
||||
email: true,
|
||||
displayName: true,
|
||||
avatar: true,
|
||||
avatarType: true,
|
||||
avatarStyle: true,
|
||||
createdAt: true,
|
||||
updatedAt: true,
|
||||
@@ -48,7 +47,6 @@ export async function registerAdminUserRoutes(fastify) {
|
||||
email: u.email,
|
||||
displayName: u.displayName,
|
||||
avatar: u.avatar,
|
||||
avatarType: u.avatarType,
|
||||
avatarStyle: u.avatarStyle,
|
||||
createdAt: u.createdAt,
|
||||
updatedAt: u.updatedAt,
|
||||
|
||||
@@ -40,7 +40,7 @@ export async function registerPublicReviewRoutes(fastify) {
|
||||
const rows = await prisma.review.findMany({
|
||||
where: { status: 'approved', product: { published: true } },
|
||||
include: {
|
||||
user: { select: { email: true, displayName: true, avatar: true, avatarType: true, avatarStyle: true } },
|
||||
user: { select: { email: true, displayName: true, avatar: true, avatarStyle: true } },
|
||||
product: { select: { id: true, title: true, published: true, slug: true } },
|
||||
},
|
||||
orderBy: { createdAt: 'desc' },
|
||||
@@ -55,7 +55,6 @@ export async function registerPublicReviewRoutes(fastify) {
|
||||
createdAt: r.createdAt,
|
||||
authorDisplay: publicReviewAuthorDisplay(r.user),
|
||||
authorAvatar: r.user?.avatar ?? null,
|
||||
authorAvatarType: r.user?.avatarType ?? null,
|
||||
authorAvatarStyle: r.user?.avatarStyle ?? null,
|
||||
product: {
|
||||
id: r.product?.id ?? r.productId,
|
||||
@@ -88,7 +87,7 @@ export async function registerPublicReviewRoutes(fastify) {
|
||||
const rawItems = await prisma.review.findMany({
|
||||
where,
|
||||
include: {
|
||||
user: { select: { email: true, displayName: true, avatar: true, avatarType: true, avatarStyle: true } },
|
||||
user: { select: { email: true, displayName: true, avatar: true, avatarStyle: true } },
|
||||
},
|
||||
orderBy: { createdAt: 'desc' },
|
||||
skip: (page - 1) * pageSize,
|
||||
@@ -103,7 +102,6 @@ export async function registerPublicReviewRoutes(fastify) {
|
||||
createdAt: r.createdAt,
|
||||
authorDisplay: publicReviewAuthorDisplay(r.user),
|
||||
authorAvatar: r.user?.avatar ?? null,
|
||||
authorAvatarType: r.user?.avatarType ?? null,
|
||||
authorAvatarStyle: r.user?.avatarStyle ?? null,
|
||||
}))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user