1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Fix lint and tests

This commit is contained in:
Chocobozzz 2024-06-21 15:24:49 +02:00
parent 4f4d3adf73
commit 985e79f61e
No known key found for this signature in database
GPG key ID: 583A612D890159BE
7 changed files with 40 additions and 37 deletions

View file

@ -1,6 +1,6 @@
import { ExpressPromiseHandler } from '@server/types/express-handler.js'
import { NextFunction, Request, RequestHandler, Response } from 'express'
import { ValidationChain } from 'express-validator'
import { ExpressPromiseHandler } from '@server/types/express-handler.js'
import { retryTransactionWrapper } from '../helpers/database-utils.js'
// Syntactic sugar to avoid try/catch in express controllers/middlewares
@ -15,7 +15,7 @@ function asyncMiddleware (fun: RequestPromiseHandler | RequestPromiseHandler[])
}
try {
for (const f of (fun as RequestPromiseHandler[])) {
for (const f of fun) {
await new Promise<void>((resolve, reject) => {
return asyncMiddleware(f)(req, res, err => {
if (err) return reject(err)