Работает сохранение новой статьи.
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({
|
||||
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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user