Skip to content

Commit f337c39

Browse files
committed
fix(api): update forbidden method signature to support optional message parameter
1 parent bfcf232 commit f337c39

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/meteor/app/api/server/ApiClass.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ import { wrapExceptions } from '@rocket.chat/tools';
1010
import type { ValidateFunction } from 'ajv';
1111
import { Accounts } from 'meteor/accounts-base';
1212
import { DDP } from 'meteor/ddp';
13-
// eslint-disable-next-line import/no-duplicates
1413
import { DDPCommon } from 'meteor/ddp-common';
1514
import { Meteor } from 'meteor/meteor';
1615
import type { RateLimiterOptionsToCheck } from 'meteor/rate-limit';
17-
// eslint-disable-next-line import/no-duplicates
1816
import { RateLimiter } from 'meteor/rate-limit';
1917
import _ from 'underscore';
2018

@@ -373,7 +371,9 @@ export class APIClass<TBasePath extends string = '', TOperations extends Record<
373371
};
374372
}
375373

376-
public forbidden<T = string>(msg?: T): ForbiddenResult<T> {
374+
public forbidden(): ForbiddenResult<string>;
375+
376+
public forbidden<T>(msg?: T): ForbiddenResult<T> {
377377
return {
378378
statusCode: 403,
379379
body: {

0 commit comments

Comments
 (0)