UNPKG

@feqra/voucher-pool-common

Version:

Common library used to handle common errors for a voucher pool system generation.

10 lines (9 loc) 311 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 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(); };