diff --git a/core/server/services/limits.js b/core/server/services/limits.js index f669213719..03111d8b9d 100644 --- a/core/server/services/limits.js +++ b/core/server/services/limits.js @@ -13,7 +13,22 @@ const initFn = () => { helpLink = 'https://ghost.org/help/'; } - limitService.loadLimits({limits: config.get('hostSettings:limits'), db, helpLink, errors}); + let subscription; + + if (config.get('hostSettings:subscription')) { + subscription = { + startDate: config.get('hostSettings:subscription:start'), + interval: 'month' + }; + } + + limitService.loadLimits({ + limits: config.get('hostSettings:limits'), + subscription, + db, + helpLink, + errors + }); }; module.exports = limitService; diff --git a/package.json b/package.json index b387912cf2..60ed08790a 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@tryghost/kg-default-cards": "4.0.3", "@tryghost/kg-markdown-html-renderer": "4.0.2", "@tryghost/kg-mobiledoc-html-renderer": "4.0.0", - "@tryghost/limit-service": "0.4.3", + "@tryghost/limit-service": "0.5.0", "@tryghost/magic-link": "1.0.2", "@tryghost/members-api": "1.4.0", "@tryghost/members-csv": "1.0.0", diff --git a/yarn.lock b/yarn.lock index f8987d0a3a..572244a7ae 100644 --- a/yarn.lock +++ b/yarn.lock @@ -714,12 +714,13 @@ dependencies: "@tryghost/kg-clean-basic-html" "^1.0.17" -"@tryghost/limit-service@0.4.3": - version "0.4.3" - resolved "https://registry.yarnpkg.com/@tryghost/limit-service/-/limit-service-0.4.3.tgz#2594941c14b14fc9e99846a13fd218ecbbe253b3" - integrity sha512-ZdiT5irH6+EUXKw/8ie9CccDfhpS6CbnW0WtzvLbHWP7nPfbZ2iXasmdhNYugHeWHJcZyW41CrKBM/qIxvDUNQ== +"@tryghost/limit-service@0.4.4": + version "0.4.4" + resolved "https://registry.yarnpkg.com/@tryghost/limit-service/-/limit-service-0.4.4.tgz#09c0cbb7c32dc88226f6658b3ef15354d75e81f7" + integrity sha512-ZYP1TOUqcdOiq2eArOOKvZD5zW6pioLesdp7EK9L2Bgv90doU8qotTqMjuKdkyeMFjcmkYwTNkawNg3oaGpyhg== dependencies: lodash "^4.17.21" + luxon "^1.26.0" "@tryghost/magic-link@1.0.2", "@tryghost/magic-link@^1.0.2": version "1.0.2" @@ -6141,6 +6142,11 @@ lru_map@^0.3.3: resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" integrity sha1-tcg1G5Rky9dQM1p5ZQoOwOVhGN0= +luxon@^1.26.0: + version "1.26.0" + resolved "https://registry.yarnpkg.com/luxon/-/luxon-1.26.0.tgz#d3692361fda51473948252061d0f8561df02b578" + integrity sha512-+V5QIQ5f6CDXQpWNICELwjwuHdqeJM1UenlZWx5ujcRMc9venvluCjFb4t5NYLhb6IhkbMVOxzVuOqkgMxee2A== + mailcomposer@~0.2.10: version "0.2.12" resolved "https://registry.yarnpkg.com/mailcomposer/-/mailcomposer-0.2.12.tgz#4d02a604616adcb45fb36d37513f4c1bd0b75681"