mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
Merge pull request #33361 from overleaf/copilot/remove-direct-use-of-body-parser
Remove direct use of body-parser in favour of express built-ins GitOrigin-RevId: 656c5f216daf68e86d53ae07d272e080bd5ab27f
This commit is contained in:
@@ -2,7 +2,6 @@ import Metrics from '@overleaf/metrics'
|
||||
import logger from '@overleaf/logger'
|
||||
import OError from '@overleaf/o-error'
|
||||
import express from 'express'
|
||||
import bodyParser from 'body-parser'
|
||||
import * as Errors from './Errors.js'
|
||||
import * as Router from './Router.js'
|
||||
import { handleValidationError } from '@overleaf/validation-tools'
|
||||
@@ -40,8 +39,8 @@ HistoryLogger.addSerializers({
|
||||
})
|
||||
|
||||
export const app = express()
|
||||
app.use(bodyParser.json())
|
||||
app.use(bodyParser.urlencoded({ extended: true }))
|
||||
app.use(express.json())
|
||||
app.use(express.urlencoded({ extended: true }))
|
||||
app.use(Metrics.http.monitor(logger))
|
||||
Router.initialize(app)
|
||||
Metrics.injectMetricsRoute(app)
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
"@overleaf/stream-utils": "workspace:*",
|
||||
"@overleaf/validation-tools": "workspace:*",
|
||||
"async": "^3.2.5",
|
||||
"body-parser": "1.20.4",
|
||||
"bunyan": "^1.8.15",
|
||||
"diff-match-patch": "overleaf/diff-match-patch#89805f9c671a77a263fc53461acd62aa7498f688",
|
||||
"express": "4.22.1",
|
||||
|
||||
Reference in New Issue
Block a user