mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Fixed ThemeStorage inheritance
refs https://github.com/TryGhost/Toolbox/issues/95 - The ThemeStorage was never supposed to inherit image specific mehods. The LocalStorageBase is all it needs, might be even too much - Look mum no saveRaw!
This commit is contained in:
parent
c802097b72
commit
22ac28b250
3 changed files with 8 additions and 8 deletions
|
@ -24,7 +24,7 @@ class LocalStorageBase extends StorageBase {
|
|||
*
|
||||
* @param {Object} options
|
||||
* @param {String} options.storagePath
|
||||
* @param {String} options.staticFileURLPrefix
|
||||
* @param {String} [options.staticFileURLPrefix]
|
||||
* @param {Object} [options.errorMessages]
|
||||
* @param {String} [options.errorMessages.notFound]
|
||||
* @param {String} [options.errorMessages.notFoundWithRef]
|
||||
|
@ -102,7 +102,7 @@ class LocalStorageBase extends StorageBase {
|
|||
maxAge: constants.ONE_YEAR_MS,
|
||||
fallthrough: false,
|
||||
onEnd: () => {
|
||||
logging.info('LocalFileStorage.serve', req.path, moment().diff(startedAtMoment, 'ms') + 'ms');
|
||||
logging.info('LocalStorageBase.serve', req.path, moment().diff(startedAtMoment, 'ms') + 'ms');
|
||||
}
|
||||
}
|
||||
)(req, res, (err) => {
|
||||
|
|
|
@ -4,16 +4,16 @@ const path = require('path');
|
|||
const config = require('../../../shared/config');
|
||||
const security = require('@tryghost/security');
|
||||
const {compress} = require('@tryghost/zip');
|
||||
const LocalFileStorage = require('../../adapters/storage/LocalFileStorage');
|
||||
const LocalStorageBase = require('../../adapters/storage/LocalStorageBase');
|
||||
|
||||
/**
|
||||
* @TODO: combine with loader.js?
|
||||
*/
|
||||
class ThemeStorage extends LocalFileStorage {
|
||||
class ThemeStorage extends LocalStorageBase {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
this.storagePath = config.getContentPath('themes');
|
||||
super({
|
||||
storagePath: config.getContentPath('themes')
|
||||
});
|
||||
}
|
||||
|
||||
getTargetDir() {
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
}
|
||||
},
|
||||
"storage": {
|
||||
"active": "LocalFileStorage",
|
||||
"active": "LocalImagesStorage",
|
||||
"media": "LocalMediaStorage",
|
||||
"LocalMediaStorage": {}
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue