Fixed typescript checks.

This commit is contained in:
SamTv12345 2024-08-19 16:30:06 +02:00
parent fd9b5d0ff3
commit be49d75fde
7 changed files with 81 additions and 25 deletions

View file

@ -6,17 +6,16 @@ import {ErrorCaused} from "../../types/ErrorCaused";
const stats = require('../../stats')
exports.expressCreateServer = (hook_name:string, args: ArgsExpressType, cb:Function) => {
exports.app = args.app;
// Handle errors
/*args.app.use((req:any, res:any, next:Function) => {
args.app.set_error_handler((req, res, error)=>{
// if an error occurs Connect will pass it down
// through these "error-handling" middleware
// allowing you to respond however you like
res.status(500).send({error: 'Sorry, something bad happened!'});
console.error(err.stack ? err.stack : err.toString());
res.status(500).json({error: 'Sorry, something bad happened!'});
console.error(error.stack ? error.stack : error.toString());
stats.meter('http500').mark();
});*/
})
return cb();
};