UNPKG

@stubclub/common

Version:

11 lines (10 loc) 331 B
"use strict"; 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(); };