0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-08 02:52:39 -05:00

Updated docs/examples with errors parameter

refs https://github.com/TryGhost/Team/issues/597
refs a1962f38cd

- As errors dependency has been removed in refed commit, updated the docs with correct usage of the library.
This commit is contained in:
Naz 2021-04-05 16:21:35 +12:00
parent a1962f38cd
commit fd61555763

View file

@ -17,6 +17,7 @@ or
Below is a sample code to wire up limit service and perform few common limit checks:
```js
const errors = require('@tryghost/errors');
const LimitService = require('@tryghost/limit-service');
// create a LimitService instance
@ -61,7 +62,7 @@ const db = knex({
});
// finish initializing the limits service
limitService.loadLimits({limits, db, helpLink});
limitService.loadLimits({limits, db, helpLink, errors});
// perform limit checks