mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
chore(route) object shorthands
This commit is contained in:
parent
ed8a88bae3
commit
408ad49dc0
1 changed files with 3 additions and 2 deletions
|
|
@ -150,7 +150,7 @@ function readFiles(callback) {
|
|||
files.read(filesList, 'utf8', (error, files) => {
|
||||
if (error)
|
||||
throw error;
|
||||
|
||||
|
||||
Object.keys(files).forEach((path) => {
|
||||
const name = paths[path];
|
||||
|
||||
|
|
@ -168,10 +168,11 @@ function route(request, response, callback) {
|
|||
let name = ponse.getPathName(request);
|
||||
|
||||
const isFS = RegExp('^/$|^' + FS).test(name);
|
||||
const gzip = true;
|
||||
const p = {
|
||||
request,
|
||||
response,
|
||||
gzip : true,
|
||||
gzip,
|
||||
name,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue