mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(core): Introduce overload for boolean-type node parameter (no-changelog) (#4647)
* 📘 Set up overloads * 📘 Add temporary assertion * 🔥 Remove inferrable boolean assertions * ⏪ Undo autoformatting
This commit is contained in:
@@ -197,7 +197,7 @@ export class Grafana implements INodeType {
|
||||
Object.assign(qs, filters);
|
||||
}
|
||||
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
@@ -321,7 +321,7 @@ export class Grafana implements INodeType {
|
||||
responseData = await grafanaApiRequest.call(this, 'GET', '/teams/search', {}, qs);
|
||||
responseData = responseData.teams;
|
||||
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
@@ -404,7 +404,7 @@ export class Grafana implements INodeType {
|
||||
const endpoint = `/teams/${teamId}/members`;
|
||||
responseData = await grafanaApiRequest.call(this, 'GET', endpoint);
|
||||
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
@@ -447,7 +447,7 @@ export class Grafana implements INodeType {
|
||||
|
||||
responseData = await grafanaApiRequest.call(this, 'GET', '/org/users');
|
||||
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
if (!returnAll) {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
|
||||
Reference in New Issue
Block a user