mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-12-28 19:08:32 +08:00
impr: add req.method to dev slowdown log
!nuf
This commit is contained in:
parent
1c9dbccfa3
commit
19cef8b4af
1 changed files with 3 additions and 1 deletions
|
|
@ -123,7 +123,9 @@ function applyDevApiRoutes(app: Application): void {
|
|||
app.use(async (req, res, next) => {
|
||||
const slowdown = (await getLiveConfiguration()).dev.responseSlowdownMs;
|
||||
if (slowdown > 0) {
|
||||
Logger.info(`Simulating ${slowdown}ms delay for ${req.path}`);
|
||||
Logger.info(
|
||||
`Simulating ${slowdown}ms delay for ${req.method} ${req.path}`
|
||||
);
|
||||
await new Promise((resolve) => setTimeout(resolve, slowdown));
|
||||
}
|
||||
next();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue