sec fixes
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import express, { Request, Response } from 'express';
|
||||
import express, { Request, Response } from 'express';
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import ffmpeg from 'fluent-ffmpeg';
|
||||
@@ -198,7 +199,7 @@ app.get('/health', (req: Request, res: Response) => {
|
||||
});
|
||||
|
||||
// Error handler
|
||||
app.use((err: Error, req: Request, res: Response) => {
|
||||
app.use((err: Error, req: Request, res: Response, next: any) => {
|
||||
console.error(err.stack);
|
||||
res.status(500).json({ error: 'Something went wrong!' });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user