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:
parent
a1962f38cd
commit
fd61555763
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue