@stubclub/common
Version:
11 lines (10 loc) • 331 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.requireAuth = void 0;
var unauthorizedError_1 = require("../errors/unauthorizedError");
exports.requireAuth = function (req, res, next) {
if (!req.currentUser) {
throw new unauthorizedError_1.UnauthorizedError();
}
next();
};