add threshold for image resizing
parent
369e4854d2
commit
9c03881d5a
@ -0,0 +1,24 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
var db = require('../../database');
|
||||||
|
|
||||||
|
var async = require('async');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: 'Rename maximumImageWidth to resizeImageWidth',
|
||||||
|
timestamp: Date.UTC(2018, 9, 24),
|
||||||
|
method: function (callback) {
|
||||||
|
const meta = require('../../meta');
|
||||||
|
async.waterfall([
|
||||||
|
function (next) {
|
||||||
|
meta.configs.get('maximumImageWidth', next);
|
||||||
|
},
|
||||||
|
function (value, next) {
|
||||||
|
meta.configs.set('resizeImageWidth', value, next);
|
||||||
|
},
|
||||||
|
function (next) {
|
||||||
|
db.deleteObjectField('config', 'maximumImageWidth', next);
|
||||||
|
},
|
||||||
|
], callback);
|
||||||
|
},
|
||||||
|
};
|
Loading…
Reference in New Issue