UNPKG

lynx-framework

Version:

lynx is a NodeJS framework for Web Development, based on decorators and the async/await support.

33 lines (31 loc) 1.77 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var response_1 = require("./response"); /** * Generate an unauthorized response (status code 401). */ var UnauthorizedResponse = /** @class */ (function (_super) { __extends(UnauthorizedResponse, _super); function UnauthorizedResponse() { return _super !== null && _super.apply(this, arguments) || this; } UnauthorizedResponse.prototype.performResponse = function (_, res) { res.redirect(401, 'unauthorized'); }; return UnauthorizedResponse; }(response_1.default)); exports.default = UnauthorizedResponse; //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL2x5bngvdW5hdXRob3JpemVkLnJlc3BvbnNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7OztBQUNBLHVDQUFrQztBQUVsQzs7R0FFRztBQUNIO0lBQWtELHdDQUFRO0lBQTFEOztJQUlBLENBQUM7SUFIRyw4Q0FBZSxHQUFmLFVBQWdCLENBQVcsRUFBRSxHQUFjO1FBQ3ZDLEdBQUcsQ0FBQyxRQUFRLENBQUMsR0FBRyxFQUFFLGNBQWMsQ0FBQyxDQUFDO0lBQ3RDLENBQUM7SUFDTCwyQkFBQztBQUFELENBSkEsQUFJQyxDQUppRCxrQkFBUSxHQUl6RCIsImZpbGUiOiJ1bmF1dGhvcml6ZWQucmVzcG9uc2UuanMiLCJzb3VyY2VSb290IjoiIn0=