Skip to content

Commit

Permalink
this should be sufficient
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyfischetti committed Dec 18, 2024
1 parent 29c5bcd commit e6dda7c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
8 changes: 5 additions & 3 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Prints and Photographs Discovery tool",
"version": "2.1.2",
"version": "2.1.3",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down
1 change: 0 additions & 1 deletion pages/api/v1/main/dtajax/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) }).
Expand Down

0 comments on commit e6dda7c

Please sign in to comment.