Skip to content

Commit

Permalink
Override default 'maxBytes'
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Caldwell committed Jan 3, 2020
1 parent 45cbe96 commit 024f274
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ function importData({ callWithRequest, id, index, settings, mappings, ingestPipe

export function getImportRouteHandler(elasticsearchPlugin, getSavedObjectsRepository) {
return async (con, req, res) => {
// console.log(JSON.stringify(Object.keys(req)));
const requestObj = {
query: req.query,
body: req.body,
Expand Down Expand Up @@ -96,8 +95,12 @@ export const initRoutes = (router, esPlugin, getSavedObjectsRepository) => {
query: schema.object({}, { allowUnknowns: true }),
body: schema.object({}, { allowUnknowns: true }),
},
//validate: importRouteConfig,
// config: importRouteConfig.validate,
options: {
body: {
maxBytes: MAX_BYTES,
accepts: ['application/json'],
},
},
},
getImportRouteHandler(esPlugin, getSavedObjectsRepository)
);
Expand Down

0 comments on commit 024f274

Please sign in to comment.