mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
Removed unnecessary callback function
- `serveStatic` doesn't even support this parameter, so the function is never called - this clears up a big red line in code editors
This commit is contained in:
parent
d7504bdbf5
commit
f65c31c8b2
1 changed files with 1 additions and 8 deletions
|
@ -4,9 +4,7 @@ const serveStatic = require('../../../shared/express').static;
|
||||||
|
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const moment = require('moment');
|
|
||||||
const tpl = require('@tryghost/tpl');
|
const tpl = require('@tryghost/tpl');
|
||||||
const logging = require('@tryghost/logging');
|
|
||||||
const errors = require('@tryghost/errors');
|
const errors = require('@tryghost/errors');
|
||||||
const constants = require('@tryghost/constants');
|
const constants = require('@tryghost/constants');
|
||||||
const urlUtils = require('../../../shared/url-utils');
|
const urlUtils = require('../../../shared/url-utils');
|
||||||
|
@ -127,16 +125,11 @@ class LocalStorageBase extends StorageBase {
|
||||||
const {storagePath, errorMessages} = this;
|
const {storagePath, errorMessages} = this;
|
||||||
|
|
||||||
return function serveStaticContent(req, res, next) {
|
return function serveStaticContent(req, res, next) {
|
||||||
const startedAtMoment = moment();
|
|
||||||
|
|
||||||
return serveStatic(
|
return serveStatic(
|
||||||
storagePath,
|
storagePath,
|
||||||
{
|
{
|
||||||
maxAge: constants.ONE_YEAR_MS,
|
maxAge: constants.ONE_YEAR_MS,
|
||||||
fallthrough: false,
|
fallthrough: false
|
||||||
onEnd: () => {
|
|
||||||
logging.info('LocalStorageBase.serve', req.path, moment().diff(startedAtMoment, 'ms') + 'ms');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
)(req, res, (err) => {
|
)(req, res, (err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue