mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 06:15:48 +01:00
wip
This commit is contained in:
@@ -89,14 +89,9 @@ function route(method, path, middleware, routeHandler, resultHandler, transactio
|
||||
cls.set('localNowDateTime', req.headers['`trilium-local-now-datetime`']);
|
||||
protectedSessionService.setProtectedSessionId(req);
|
||||
|
||||
if (transactional) {
|
||||
return sql.transactional(() => {
|
||||
return routeHandler(req, res, next);
|
||||
});
|
||||
}
|
||||
else {
|
||||
return routeHandler(req, res, next);
|
||||
}
|
||||
const cb = () => routeHandler(req, res, next);
|
||||
|
||||
return transactional ? sql.transactional(cb) : cb();
|
||||
});
|
||||
|
||||
if (resultHandler) {
|
||||
|
||||
Reference in New Issue
Block a user