mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
Turn your audience into a business. Publishing, memberships, subscriptions and newsletters.
bloggingcmsemberghosthacktoberfestheadless-cmsjamstackjavascriptjournalismnodejspublishingweb-application
f4f48712c5
refs https://github.com/TryGhost/Team/issues/597 - When the library is used on a client without a DB connection (e.g. frontend client running in a browser) the library needs to expose a way to override count queries. - The way these can be used is giving a count based on a HTTP request or some other data provider - Example use with max limit like "staff" would be loading the limit servcie if following way: ``` const limitService = new LimitService(); let limits = { staff: { max: 2, currentCountQuery: () => 5 } }; limitService.loadLimits({limits, errors}); await limitService.checkIsOverLimit('staff') ``` |
||
---|---|---|
ghost |