mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
added express-promise-wrap to catch and respond to unhandled exceptions immediately, previously the requests just hanged
This commit is contained in:
@@ -3,9 +3,10 @@
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const auth = require('../services/auth');
|
||||
const wrap = require('express-promise-wrap').wrap;
|
||||
|
||||
router.get('', auth.checkAuthForMigrationPage, (req, res, next) => {
|
||||
router.get('', auth.checkAuthForMigrationPage, wrap(async (req, res, next) => {
|
||||
res.render('migration', {});
|
||||
});
|
||||
}));
|
||||
|
||||
module.exports = router;
|
||||
|
||||
Reference in New Issue
Block a user