diff --git a/pages/api/revalidate-portfolio.ts b/pages/api/revalidate-portfolio.ts deleted file mode 100644 index c37ba32..0000000 --- a/pages/api/revalidate-portfolio.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { NextApiRequest, NextApiResponse } from "next"; - -export default async function handler( - req: NextApiRequest, - res: NextApiResponse, -) { - if (req.method !== "POST") { - return res - .status(400) - .json({ error: "Invalid HTTP method. Only POST method is allowed." }); - } - - try { - await res.revalidate(`/portfolio/${req.body.portfolioId}`); - return res.json({ revalidated: true }); - } catch (err) { - return res.status(500).send(`Error revalidating: ${err}`); - } -}