diff --git a/next.config.js b/next.config.js index 0d607100..4bb592ab 100644 --- a/next.config.js +++ b/next.config.js @@ -1,3 +1,6 @@ module.exports = { reactStrictMode: true, + serverActions: { + bodySizeLimit: '3mb' + } } diff --git a/pages/api/v1/applicants/index.ts b/pages/api/v1/applicants/index.ts index f700b234..5e269341 100644 --- a/pages/api/v1/applicants/index.ts +++ b/pages/api/v1/applicants/index.ts @@ -67,5 +67,12 @@ function parseSort(queryString: string | string[]): any { // sort may not be stable, so sort by email as well return { [field]: sort.order === 'ascend' ? 1 : -1, email: -1 }; } +export const config = { + api: { + bodyParser: { + sizeLimit: '3mb' + } + } +} export default protect(handler); diff --git a/pages/api/v1/registration.ts b/pages/api/v1/registration.ts index b1f82646..eb8030d3 100644 --- a/pages/api/v1/registration.ts +++ b/pages/api/v1/registration.ts @@ -150,4 +150,12 @@ const patchHandler: NextApiHandler = async (req, res) => { return res.status(200).send(undefined); }; +export const config = { + api: { + bodyParser: { + sizeLimit: '3mb' + } + } +} + export default protect(registrationHandler);