1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-12 02:42:48 +00:00

updated bunch of file paths and changed the way posts are loaded

This commit is contained in:
2016-01-05 12:28:04 -06:00
parent 4bb8cae81e
commit 6ab45fe935
13249 changed files with 317868 additions and 2101398 deletions

View File

@@ -1,3 +1,13 @@
/*!
* express
* Copyright(c) 2009-2013 TJ Holowaychuk
* Copyright(c) 2013 Roman Shtylman
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict';
/**
* Initialization middleware, exposing the
* request and response to each other, as well

View File

@@ -1,3 +1,13 @@
/*!
* express
* Copyright(c) 2009-2013 TJ Holowaychuk
* Copyright(c) 2013 Roman Shtylman
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict';
/**
* Module dependencies.
*/
@@ -12,17 +22,28 @@ var qs = require('qs');
*/
module.exports = function query(options) {
var opts = Object.create(options || null);
var queryparse = qs.parse;
if (typeof options === 'function') {
queryparse = options;
options = undefined;
opts = undefined;
}
if (opts !== undefined) {
if (opts.allowDots === undefined) {
opts.allowDots = false;
}
if (opts.allowPrototypes === undefined) {
opts.allowPrototypes = true;
}
}
return function query(req, res, next){
if (!req.query) {
var val = parseUrl(req).query;
req.query = queryparse(val, options);
req.query = queryparse(val, opts);
}
next();