mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -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 path = require('path');
|
||||
const moment = require('moment');
|
||||
const tpl = require('@tryghost/tpl');
|
||||
const logging = require('@tryghost/logging');
|
||||
const errors = require('@tryghost/errors');
|
||||
const constants = require('@tryghost/constants');
|
||||
const urlUtils = require('../../../shared/url-utils');
|
||||
|
@ -127,16 +125,11 @@ class LocalStorageBase extends StorageBase {
|
|||
const {storagePath, errorMessages} = this;
|
||||
|
||||
return function serveStaticContent(req, res, next) {
|
||||
const startedAtMoment = moment();
|
||||
|
||||
return serveStatic(
|
||||
storagePath,
|
||||
{
|
||||
maxAge: constants.ONE_YEAR_MS,
|
||||
fallthrough: false,
|
||||
onEnd: () => {
|
||||
logging.info('LocalStorageBase.serve', req.path, moment().diff(startedAtMoment, 'ms') + 'ms');
|
||||
}
|
||||
fallthrough: false
|
||||
}
|
||||
)(req, res, (err) => {
|
||||
if (err) {
|
||||
|
|
Loading…
Add table
Reference in a new issue