From e6dda7cc074be1a46d0d65ef067b88d460fa8816 Mon Sep 17 00:00:00 2001 From: Tony Fischetti Date: Wed, 18 Dec 2024 13:14:28 -0500 Subject: [PATCH] this should be sufficient --- next.config.ts | 8 +++++--- package.json | 2 +- pages/api/v1/main/dtajax/index.ts | 1 - 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/next.config.ts b/next.config.ts index 24696c9..08724fd 100644 --- a/next.config.ts +++ b/next.config.ts @@ -16,12 +16,14 @@ const nextConfig: NextConfig = { { source: '/api/v1', headers: [ - { key: 'Content-Type', value: 'application/json' }, // Or any other MIME type + { + key: 'Content-Type', + value: 'application/json' + }, ], }, ] - }, - + } }; export default nextConfig; diff --git a/package.json b/package.json index ca66adf..8c40426 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Prints and Photographs Discovery tool", - "version": "2.1.2", + "version": "2.1.3", "private": true, "scripts": { "dev": "next dev", diff --git a/pages/api/v1/main/dtajax/index.ts b/pages/api/v1/main/dtajax/index.ts index ef724d4..d750fda 100644 --- a/pages/api/v1/main/dtajax/index.ts +++ b/pages/api/v1/main/dtajax/index.ts @@ -35,7 +35,6 @@ export const performAJAX = (params: DTAJAXParams) => { export const handler = async (req: NextApiRequest, res: NextApiResponse) => { const impossibleErrorMessage = "couldn't read NextRequest.URL string"; - res.setHeader('Content-Type', 'application/json'); return Promise.resolve(req.url ?? impossibleErrorMessage). then(_ => { if (req.url !== undefined) return req.url; throw new Error(impossibleErrorMessage) }).