0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00

Persisted email freeze in settings table

refs https://github.com/TryGhost/Team/issues/912

- The email freeze state has to be stored somewhere to make it through the instance restart and settings table is the best place for it.
This commit is contained in:
Naz 2021-07-27 13:27:59 +04:00 committed by naz
parent 2fbc1af165
commit 06788f0b6a

View file

@ -12,6 +12,7 @@ const urlUtils = require('../../../shared/url-utils');
const labsService = require('../../../shared/labs');
const settingsCache = require('../../../shared/settings-cache');
const config = require('../../../shared/config');
const models = require('../../models');
const ghostVersion = require('@tryghost/version');
const _ = require('lodash');
const {GhostMailer} = require('../mail');
@ -85,6 +86,11 @@ const processImport = async (options) => {
}
});
await models.Settings.edit([{
key: 'email_freeze',
value: true
}], {context: {internal: true}});
throw new errors.ValidationError({
message: tpl(messages.emailVerificationNeeded)
});