From 9c338dc71512a03af5c549b43fbc8705d5d758c4 Mon Sep 17 00:00:00 2001 From: void2610 Date: Tue, 17 Oct 2023 01:07:59 +0900 Subject: [PATCH] =?UTF-8?q?ts=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/get_notices.cjs | 15 --------------- next.config.js | 1 - 2 files changed, 16 deletions(-) delete mode 100644 api/get_notices.cjs diff --git a/api/get_notices.cjs b/api/get_notices.cjs deleted file mode 100644 index 87bfdf4..0000000 --- a/api/get_notices.cjs +++ /dev/null @@ -1,15 +0,0 @@ -const { PrismaClient } = require("@prisma/client"); - -module.exports = async function getData(req, res) { - const prisma = new PrismaClient(); - - try { - const data = await prisma.notices.findMany(); - - res.status(200).json(data); - } catch (error) { - res.status(500).json({ error: "Error fetching data" }); - } finally { - await prisma.$disconnect(); - } -}; diff --git a/next.config.js b/next.config.js index 795cffd..f7441cd 100644 --- a/next.config.js +++ b/next.config.js @@ -1,6 +1,5 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - output: "export", images: { unoptimized: true, // 画像の最適化を無効にする },