mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
810c3077e8
refs https://github.com/TryGhost/Team/issues/1549 This allows us to restrict certain sites to a single newsletter
17 lines
622 B
JavaScript
17 lines
622 B
JavaScript
const NewslettersService = require('./service.js');
|
|
const SingleUseTokenProvider = require('../members/SingleUseTokenProvider');
|
|
const mail = require('../mail');
|
|
const models = require('../../models');
|
|
const urlUtils = require('../../../shared/url-utils');
|
|
const limitService = require('../limits');
|
|
|
|
const MAGIC_LINK_TOKEN_VALIDITY = 24 * 60 * 60 * 1000;
|
|
|
|
module.exports = new NewslettersService({
|
|
NewsletterModel: models.Newsletter,
|
|
MemberModel: models.Member,
|
|
mail,
|
|
singleUseTokenProvider: new SingleUseTokenProvider(models.SingleUseToken, MAGIC_LINK_TOKEN_VALIDITY),
|
|
urlUtils,
|
|
limitService
|
|
});
|