From e26597e0455d6ac6552cbb60e02967f0af049d6f Mon Sep 17 00:00:00 2001 From: Naz Date: Tue, 11 May 2021 17:15:22 +0400 Subject: [PATCH] Added header to the section no issue - Made it clear what this part of the doc is about --- ghost/limit-service/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ghost/limit-service/README.md b/ghost/limit-service/README.md index d0c4770717..de4975e7e9 100644 --- a/ghost/limit-service/README.md +++ b/ghost/limit-service/README.md @@ -132,6 +132,8 @@ There's a limited amount of limits that are supported by limit service. The are All limits can act as `flag` or `allowList` types. Only certain (`members`, `staff`, and`customIntegrations`) can have a `max` limit. Only `emails` currently supports the `maxPeriodic` type of limit. +### Frontend usage +In case the limit check is run without direct access to the database you can override `currentCountQuery` functions for each "max" or "maxPeriodic" type of limit. An example usecase would be a frontend client running in a browser. A browser client can check the limit data through HTTP request and then provide that data to the limit service. Example code to do exactly that: ```js const limitService = new LimitService();