test commit
This commit is contained in:
@@ -42,7 +42,6 @@ export type AdminOrderDetailResponse = {
|
|||||||
email: string
|
email: string
|
||||||
displayName: string | null
|
displayName: string | null
|
||||||
avatar?: string | null
|
avatar?: string | null
|
||||||
avatarType?: string | null
|
|
||||||
avatarStyle?: string | null
|
avatarStyle?: string | null
|
||||||
}
|
}
|
||||||
items: Array<{
|
items: Array<{
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ export type PublicReviewFeedItem = {
|
|||||||
createdAt: string
|
createdAt: string
|
||||||
authorDisplay: string
|
authorDisplay: string
|
||||||
authorAvatar?: string | null
|
authorAvatar?: string | null
|
||||||
authorAvatarType?: string | null
|
|
||||||
authorAvatarStyle?: string | null
|
authorAvatarStyle?: string | null
|
||||||
product: {
|
product: {
|
||||||
id: string
|
id: string
|
||||||
@@ -56,7 +55,6 @@ export type PublicProductReviewItem = {
|
|||||||
createdAt: string
|
createdAt: string
|
||||||
authorDisplay: string
|
authorDisplay: string
|
||||||
authorAvatar?: string | null
|
authorAvatar?: string | null
|
||||||
authorAvatarType?: string | null
|
|
||||||
authorAvatarStyle?: string | null
|
authorAvatarStyle?: string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ export async function updateAdminUser(
|
|||||||
|
|
||||||
export type AdminAvatarResponse = {
|
export type AdminAvatarResponse = {
|
||||||
avatar: string | null
|
avatar: string | null
|
||||||
avatarType: string | null
|
|
||||||
avatarStyle: string | null
|
avatarStyle: string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ export type AdminUser = {
|
|||||||
email: string
|
email: string
|
||||||
displayName: string | null
|
displayName: string | null
|
||||||
avatar?: string | null
|
avatar?: string | null
|
||||||
avatarType?: string | null
|
|
||||||
avatarStyle?: string | null
|
avatarStyle?: string | null
|
||||||
createdAt: string
|
createdAt: string
|
||||||
updatedAt: string
|
updatedAt: string
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ export function AdminSettingsPage() {
|
|||||||
email: string
|
email: string
|
||||||
displayName: string | null
|
displayName: string | null
|
||||||
avatar: string | null
|
avatar: string | null
|
||||||
avatarType: string | null
|
|
||||||
avatarStyle: string | null
|
avatarStyle: string | null
|
||||||
}>('admin/profile')
|
}>('admin/profile')
|
||||||
return data
|
return data
|
||||||
|
|||||||
Binary file not shown.
@@ -74,7 +74,7 @@ export async function registerAdminOrderRoutes(fastify) {
|
|||||||
where: { id },
|
where: { id },
|
||||||
include: {
|
include: {
|
||||||
user: {
|
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,
|
items: true,
|
||||||
messages: { orderBy: { createdAt: 'asc' } },
|
messages: { orderBy: { createdAt: 'asc' } },
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ export async function registerAdminUserRoutes(fastify) {
|
|||||||
email: true,
|
email: true,
|
||||||
displayName: true,
|
displayName: true,
|
||||||
avatar: true,
|
avatar: true,
|
||||||
avatarType: true,
|
|
||||||
avatarStyle: true,
|
avatarStyle: true,
|
||||||
createdAt: true,
|
createdAt: true,
|
||||||
updatedAt: true,
|
updatedAt: true,
|
||||||
@@ -48,7 +47,6 @@ export async function registerAdminUserRoutes(fastify) {
|
|||||||
email: u.email,
|
email: u.email,
|
||||||
displayName: u.displayName,
|
displayName: u.displayName,
|
||||||
avatar: u.avatar,
|
avatar: u.avatar,
|
||||||
avatarType: u.avatarType,
|
|
||||||
avatarStyle: u.avatarStyle,
|
avatarStyle: u.avatarStyle,
|
||||||
createdAt: u.createdAt,
|
createdAt: u.createdAt,
|
||||||
updatedAt: u.updatedAt,
|
updatedAt: u.updatedAt,
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export async function registerPublicReviewRoutes(fastify) {
|
|||||||
const rows = await prisma.review.findMany({
|
const rows = await prisma.review.findMany({
|
||||||
where: { status: 'approved', product: { published: true } },
|
where: { status: 'approved', product: { published: true } },
|
||||||
include: {
|
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 } },
|
product: { select: { id: true, title: true, published: true, slug: true } },
|
||||||
},
|
},
|
||||||
orderBy: { createdAt: 'desc' },
|
orderBy: { createdAt: 'desc' },
|
||||||
@@ -55,7 +55,6 @@ export async function registerPublicReviewRoutes(fastify) {
|
|||||||
createdAt: r.createdAt,
|
createdAt: r.createdAt,
|
||||||
authorDisplay: publicReviewAuthorDisplay(r.user),
|
authorDisplay: publicReviewAuthorDisplay(r.user),
|
||||||
authorAvatar: r.user?.avatar ?? null,
|
authorAvatar: r.user?.avatar ?? null,
|
||||||
authorAvatarType: r.user?.avatarType ?? null,
|
|
||||||
authorAvatarStyle: r.user?.avatarStyle ?? null,
|
authorAvatarStyle: r.user?.avatarStyle ?? null,
|
||||||
product: {
|
product: {
|
||||||
id: r.product?.id ?? r.productId,
|
id: r.product?.id ?? r.productId,
|
||||||
@@ -88,7 +87,7 @@ export async function registerPublicReviewRoutes(fastify) {
|
|||||||
const rawItems = await prisma.review.findMany({
|
const rawItems = await prisma.review.findMany({
|
||||||
where,
|
where,
|
||||||
include: {
|
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' },
|
orderBy: { createdAt: 'desc' },
|
||||||
skip: (page - 1) * pageSize,
|
skip: (page - 1) * pageSize,
|
||||||
@@ -103,7 +102,6 @@ export async function registerPublicReviewRoutes(fastify) {
|
|||||||
createdAt: r.createdAt,
|
createdAt: r.createdAt,
|
||||||
authorDisplay: publicReviewAuthorDisplay(r.user),
|
authorDisplay: publicReviewAuthorDisplay(r.user),
|
||||||
authorAvatar: r.user?.avatar ?? null,
|
authorAvatar: r.user?.avatar ?? null,
|
||||||
authorAvatarType: r.user?.avatarType ?? null,
|
|
||||||
authorAvatarStyle: r.user?.avatarStyle ?? null,
|
authorAvatarStyle: r.user?.avatarStyle ?? null,
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user