0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-30 22:34:10 -05:00

Refactor api, relocate routes and clean up the code

This commit is contained in:
Juan Picado @jotadeveloper 2017-06-15 15:53:55 +02:00
parent c9bf4ed20e
commit e9f3d0d0c3
No known key found for this signature in database
GPG key ID: 18AC54485952D158
2 changed files with 2 additions and 1 deletions

View file

@ -1,9 +1,9 @@
'use strict'; 'use strict';
const async = require('async'); const async = require('async');
const escape = require('js-string-escape');
const bodyParser = require('body-parser'); const bodyParser = require('body-parser');
const Cookies = require('cookies'); const Cookies = require('cookies');
const escape = require('js-string-escape');
const express = require('express'); const express = require('express');
const fs = require('fs'); const fs = require('fs');
const Handlebars = require('handlebars'); const Handlebars = require('handlebars');

View file

@ -8,6 +8,7 @@ const createError = require('http-errors');
const utils = require('../utils'); const utils = require('../utils');
const Logger = require('../logger'); const Logger = require('../logger');
module.exports.match = function match(regexp) { module.exports.match = function match(regexp) {
return function(req, res, next, value) { return function(req, res, next, value) {
if (regexp.exec(value)) { if (regexp.exec(value)) {