This commit is contained in:
Janis
2023-02-02 00:00:44 +01:00
parent 585e36e4b9
commit 2f340537d4
14 changed files with 77 additions and 24 deletions

View File

@@ -72,6 +72,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
}
data.name = formatTextToUrlName(data.title);
data.categoryId = data.categoryId.toString();
prisma.article
.create({ data: data, include: { category: true } })
.then(