mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 22:02:11 +03:00
18f4748e8b
no issue Also moves some reused test methods to the test helpers folder (wasn't able to move it to the fixtures because too many tests were failing): - enableNewsletters helper - enableStripe helper - enableMailgun helper
14 lines
788 B
JavaScript
14 lines
788 B
JavaScript
export function enableMailgun(server) {
|
|
server.db.settings.find({key: 'mailgun_api_key'})
|
|
? server.db.settings.update({key: 'mailgun_api_key'}, {value: 'MAILGUN_API_KEY'})
|
|
: server.create('setting', {key: 'mailgun_api_key', value: 'MAILGUN_API_KEY', group: 'email'});
|
|
|
|
server.db.settings.find({key: 'mailgun_domain'})
|
|
? server.db.settings.update({key: 'mailgun_domain'}, {value: 'MAILGUN_DOMAIN'})
|
|
: server.create('setting', {key: 'mailgun_domain', value: 'MAILGUN_DOMAIN', group: 'email'});
|
|
|
|
server.db.settings.find({key: 'mailgun_base_url'})
|
|
? server.db.settings.update({key: 'mailgun_base_url'}, {value: 'MAILGUN_BASE_URL'})
|
|
: server.create('setting', {key: 'mailgun_base_url', value: 'MAILGUN_BASE_URL', group: 'email'});
|
|
}
|