@di-zed/yandex-smart-home
Version:
The Yandex Smart Home skills for the different device types.
15 lines (14 loc) • 330 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Wrap asynchronous methods to automatically catch exceptions.
*
* @param fn
* @returns any
*/
function default_1(fn) {
return function (req, res, next) {
return fn(req, res, next).catch(next);
};
}
exports.default = default_1;