mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-08 02:52:39 -05:00
Updated JSDocs for limit-service module
no issue
This commit is contained in:
parent
a61bf71a16
commit
0b8d0feb87
1 changed files with 12 additions and 0 deletions
|
@ -101,6 +101,12 @@ class LimitService {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {String} limitName - name of the configured limit
|
||||
* @param {Object} metadata - limit parameters
|
||||
* @returns
|
||||
*/
|
||||
async errorIfIsOverLimit(limitName, metadata = {}) {
|
||||
if (!this.isLimited(limitName)) {
|
||||
return;
|
||||
|
@ -109,6 +115,12 @@ class LimitService {
|
|||
await this.limits[limitName].errorIfIsOverLimit(metadata);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {String} limitName - name of the configured limit
|
||||
* @param {Object} metadata - limit parameters
|
||||
* @returns
|
||||
*/
|
||||
async errorIfWouldGoOverLimit(limitName, metadata = {}) {
|
||||
if (!this.isLimited(limitName)) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue