@flanc/router-json
Advanced tools
Comparing version 0.0.1 to 0.0.2
14
index.js
"use strict"; | ||
/* istanbul ignore file */ | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.register = exports.setupRouter = exports.errorHandler = exports.path = void 0; | ||
var router_commons_1 = require("flanc/router-commons"); | ||
var documentation_1 = require("flanc/router-commons/documentation"); | ||
var router; | ||
const router_commons_1 = require("flanc/router-commons"); | ||
const documentation_1 = require("flanc/router-commons/documentation"); | ||
let router; | ||
exports.path = '/jsonapi'; | ||
@@ -14,3 +14,3 @@ function printDocumentation(req, res) { | ||
function errorHandler(err, req, res, next) { | ||
if (!req.path.match(new RegExp("^" + exports.path))) { | ||
if (!req.path.match(new RegExp(`^${exports.path}`))) { | ||
next(err); | ||
@@ -38,6 +38,6 @@ return; | ||
responseHeaders: { 'content-type': 'application/json' }, | ||
formatError: function (error) { return formatter(error); }, | ||
formatResponse: function (response) { return formatter(response); } | ||
formatError: (error) => formatter(error), | ||
formatResponse: (response) => formatter(response), | ||
}); | ||
} | ||
exports.register = register; |
{ | ||
"name": "@flanc/router-json", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "The openapi router for flanc apis", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5980
5
113