mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +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:
@@ -137,7 +137,7 @@ export class Discourse implements INodeType {
|
||||
}
|
||||
//https://docs.discourse.org/#tag/Categories/paths/~1categories.json/get
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
responseData = await discourseApiRequest.call(this, 'GET', `/categories.json`, {}, qs);
|
||||
|
||||
@@ -197,7 +197,7 @@ export class Discourse implements INodeType {
|
||||
}
|
||||
//https://docs.discourse.org/#tag/Groups/paths/~1groups.json/get
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
responseData = await discourseApiRequest.call(this, 'GET', `/groups.json`, {}, qs);
|
||||
|
||||
@@ -247,7 +247,7 @@ export class Discourse implements INodeType {
|
||||
}
|
||||
//https://docs.discourse.org/#tag/Posts/paths/~1posts.json/get
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const limit = this.getNodeParameter('limit', i, 0) as number;
|
||||
|
||||
responseData = await discourseApiRequest.call(this, 'GET', `/posts.json`, {}, qs);
|
||||
@@ -370,7 +370,7 @@ export class Discourse implements INodeType {
|
||||
}
|
||||
//https://docs.discourse.org/#tag/Users/paths/~1admin~1users~1{id}.json/delete
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const flag = this.getNodeParameter('flag', i) as boolean;
|
||||
|
||||
responseData = await discourseApiRequest.call(
|
||||
|
||||
Reference in New Issue
Block a user