From bb8fb93feeb0fc1b7bd4aa58d313c499551f4adb Mon Sep 17 00:00:00 2001 From: Yannick Bungers Date: Sun, 12 Apr 2020 12:46:41 +0200 Subject: [PATCH] Moved utils.js to utils.ts and refactored import and exports Signed-off-by: Yannick Bungers Signed-off-by: David Mehren --- lib/web/{utils.js => utils.ts} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename lib/web/{utils.js => utils.ts} (64%) diff --git a/lib/web/utils.js b/lib/web/utils.ts similarity index 64% rename from lib/web/utils.js rename to lib/web/utils.ts index d58294ad0..1a8454462 100644 --- a/lib/web/utils.js +++ b/lib/web/utils.ts @@ -1,15 +1,15 @@ 'use strict' -const bodyParser = require('body-parser') - +import bodyParser from 'body-parser' // create application/x-www-form-urlencoded parser -exports.urlencodedParser = bodyParser.urlencoded({ + +export const urlencodedParser = bodyParser.urlencoded({ extended: false, limit: 1024 * 1024 * 10 // 10 mb }) // create text/markdown parser -exports.markdownParser = bodyParser.text({ +export const markdownParser = bodyParser.text({ inflate: true, type: ['text/plain', 'text/markdown'], limit: 1024 * 1024 * 10 // 10 mb