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:
Lucie Germain
2026-09-17 11:14:46 +00:00
committed by Copybot
parent 6be5db7667
commit 210ced0d31
25 changed files with 24 additions and 65 deletions
@@ -1,6 +1,5 @@
import OError from '@overleaf/o-error'
import express from 'express'
import bodyParser from 'body-parser'
/**
* Abstract class for running a mock API via Express. Handles setting up of
@@ -49,8 +48,8 @@ class AbstractMockApi {
this.debug = debug
this.port = port
this.app = express()
this.app.use(bodyParser.json())
this.app.use(bodyParser.urlencoded({ extended: true }))
this.app.use(express.json())
this.app.use(express.urlencoded({ extended: true }))
}
/**