@memberjunction/server 5.3.1 → 5.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
1
  import express from 'express';
2
+ import BodyParser from 'body-parser';
2
3
  import { RESTEndpointHandler } from './RESTEndpointHandler.js';
3
4
 
4
5
  export const ___REST_API_BASE_PATH = '/api/v1';
@@ -81,9 +82,9 @@ export function setupRESTEndpoints(
81
82
  // Mount REST API at the specified base path with authentication
82
83
  // This must come AFTER OAuth routes so they take precedence
83
84
  if (authMiddleware) {
84
- app.use(basePath, authMiddleware, restHandler.getRouter());
85
+ app.use(basePath, BodyParser.json({ limit: '50mb' }), authMiddleware, restHandler.getRouter());
85
86
  } else {
86
- app.use(basePath, restHandler.getRouter());
87
+ app.use(basePath, BodyParser.json({ limit: '50mb' }), restHandler.getRouter());
87
88
  }
88
89
 
89
90
  console.log(`REST API endpoints have been set up at ${basePath}`);