Ship legacy migrate APIs, portfolio/blog old-id schema, and admin migrate/purge flows.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
7244b70e90
commit
4598add88c
@@ -35,13 +35,13 @@ function slugify(value: string): string {
|
||||
type BlogWithRelations = Prisma.blogsGetPayload<{
|
||||
include: {
|
||||
media: true;
|
||||
users: { select: { id: true; firstName: true; lastName: true; email: true } };
|
||||
author: { select: { id: true; firstName: true; lastName: true; email: true } };
|
||||
};
|
||||
}>;
|
||||
|
||||
const blogInclude = {
|
||||
media: true,
|
||||
users: {
|
||||
author: {
|
||||
select: {
|
||||
id: true,
|
||||
firstName: true,
|
||||
@@ -562,12 +562,12 @@ export class BlogsService {
|
||||
categoryName: categoryAssignment?.category.name ?? '',
|
||||
tags: Array.isArray(metadata.tags) ? (metadata.tags as string[]) : [],
|
||||
authorId: blog.author_id?.toString() ?? null,
|
||||
author: blog.users
|
||||
author: blog.author
|
||||
? {
|
||||
id: blog.users.id.toString(),
|
||||
firstName: blog.users.firstName,
|
||||
lastName: blog.users.lastName,
|
||||
email: blog.users.email,
|
||||
id: blog.author.id.toString(),
|
||||
firstName: blog.author.firstName,
|
||||
lastName: blog.author.lastName,
|
||||
email: blog.author.email,
|
||||
}
|
||||
: null,
|
||||
titleImageUrl: blog.media?.publicUrl ?? null,
|
||||
|
||||
Reference in New Issue
Block a user