mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +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:
@@ -1,5 +1,4 @@
|
||||
const express = require('express')
|
||||
const bodyParser = require('body-parser')
|
||||
const { EventEmitter } = require('node:events')
|
||||
const http = require('node:http')
|
||||
const https = require('node:https')
|
||||
@@ -10,7 +9,7 @@ class TestServer {
|
||||
this.app = express()
|
||||
this.events = new EventEmitter()
|
||||
|
||||
this.app.use(bodyParser.json())
|
||||
this.app.use(express.json())
|
||||
this.app.use((req, res, next) => {
|
||||
this.events.emit('request-received')
|
||||
this.lastReq = req
|
||||
|
||||
Reference in New Issue
Block a user