Работает сохранение новой статьи.
This commit is contained in:
parent
64df06db36
commit
a99fa47470
@ -44,7 +44,7 @@ export async function createArticle(req: AuthRequest, res: Response) : Promise<v
|
|||||||
}
|
}
|
||||||
|
|
||||||
const category = await prisma.category.findUnique({
|
const category = await prisma.category.findUnique({
|
||||||
where: { id: parseInt(categoryId) }
|
where: { id: categoryId }
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!category) {
|
if (!category) {
|
||||||
@ -64,7 +64,7 @@ export async function createArticle(req: AuthRequest, res: Response) : Promise<v
|
|||||||
title,
|
title,
|
||||||
excerpt,
|
excerpt,
|
||||||
content,
|
content,
|
||||||
categoryId: parseInt(categoryId),
|
categoryId,
|
||||||
city,
|
city,
|
||||||
coverImage,
|
coverImage,
|
||||||
readTime,
|
readTime,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user