Работает сохранение новой статьи.

This commit is contained in:
anibilag 2025-02-04 23:01:40 +03:00
parent 64df06db36
commit a99fa47470

View File

@ -44,7 +44,7 @@ export async function createArticle(req: AuthRequest, res: Response) : Promise<v
}
const category = await prisma.category.findUnique({
where: { id: parseInt(categoryId) }
where: { id: categoryId }
});
if (!category) {
@ -64,7 +64,7 @@ export async function createArticle(req: AuthRequest, res: Response) : Promise<v
title,
excerpt,
content,
categoryId: parseInt(categoryId),
categoryId,
city,
coverImage,
readTime,