mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 01:35:18 -04:00
Moved utils.js to utils.ts and refactored import and exports
Signed-off-by: Yannick Bungers <git@innay.de> Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
ad3e25310a
commit
bb8fb93fee
1 changed files with 4 additions and 4 deletions
|
@ -1,15 +1,15 @@
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
const bodyParser = require('body-parser')
|
import bodyParser from 'body-parser'
|
||||||
|
|
||||||
// create application/x-www-form-urlencoded parser
|
// create application/x-www-form-urlencoded parser
|
||||||
exports.urlencodedParser = bodyParser.urlencoded({
|
|
||||||
|
export const urlencodedParser = bodyParser.urlencoded({
|
||||||
extended: false,
|
extended: false,
|
||||||
limit: 1024 * 1024 * 10 // 10 mb
|
limit: 1024 * 1024 * 10 // 10 mb
|
||||||
})
|
})
|
||||||
|
|
||||||
// create text/markdown parser
|
// create text/markdown parser
|
||||||
exports.markdownParser = bodyParser.text({
|
export const markdownParser = bodyParser.text({
|
||||||
inflate: true,
|
inflate: true,
|
||||||
type: ['text/plain', 'text/markdown'],
|
type: ['text/plain', 'text/markdown'],
|
||||||
limit: 1024 * 1024 * 10 // 10 mb
|
limit: 1024 * 1024 * 10 // 10 mb
|
Loading…
Add table
Add a link
Reference in a new issue