refactor to pages

This commit is contained in:
Janis
2023-01-29 20:01:56 +01:00
parent 976a11a78f
commit 0997e8fdb8
26 changed files with 2050 additions and 1252 deletions

View File

@@ -1,6 +1,8 @@
import { Request, Response } from "express";
import prisma from "../../../lib/prisma";
//@ts-ignore
import { Prisma } from "@prisma/client";
//@ts-ignore
import { Article, Category } from "@prisma/client";
import { ResponseError } from "../../../types/responseErrors";
import { formatTextToUrlName } from "../../../utils";
@@ -111,9 +113,11 @@ export default async function handler(req: Request, res: Response) {
title: data.title,
name: formatTextToUrlName(data.title),
introduction: data.introduction,
//@ts-ignore
categoryId: data.categoryId,
contentTable: data.contentTable,
markdown: data.markdown,
//@ts-ignore
imageId: data.imageId,
}