feat(core-cms): compose @repo/blog/cms into payload config
This commit is contained in:
@@ -10,7 +10,7 @@ import { createArticleUseCase } from "@/application/use-cases/create-article.use
|
||||
|
||||
const createInputSchema = z.object({
|
||||
title: z.string().min(1).max(255),
|
||||
content: z.unknown(),
|
||||
content: z.unknown().optional(),
|
||||
authorId: z.string(),
|
||||
slug: z.string().optional(),
|
||||
});
|
||||
@@ -35,7 +35,12 @@ export async function createArticleController(
|
||||
cause: parsed.error,
|
||||
});
|
||||
}
|
||||
return createArticleUseCase(parsed.data);
|
||||
return createArticleUseCase({
|
||||
title: parsed.data.title,
|
||||
content: parsed.data.content ?? null,
|
||||
authorId: parsed.data.authorId,
|
||||
slug: parsed.data.slug,
|
||||
});
|
||||
}
|
||||
|
||||
export async function getArticlesController(
|
||||
|
||||
Reference in New Issue
Block a user