In the following code, the csv2pg function is async
const postUsages = async (req: MulterRequest, res: Response, next: any) => { try { const result =