UNPKG

@myshtickets/common

Version:

11 lines (10 loc) 351 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.requireAuth = void 0; var not_authorized_error_1 = require("../errors/not-authorized-error"); exports.requireAuth = function (req, res, next) { if (!req.currentUser) { throw new not_authorized_error_1.NotAuthorizedError(); } next(); };