mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
refactor: Lint for no unneeded backticks (#5057) (no-changelog)
* ✨ Create rule `no-unneeded-backticks` * 👕 Enable rule * ⚡ Run rule on `cli` * ⚡ Run rule on `core` * ⚡ Run rule on `workflow` * ⚡ Rule rule on `design-system` * ⚡ Run rule on `node-dev` * ⚡ Run rule on `editor-ui` * ⚡ Run rule on `nodes-base`
This commit is contained in:
@@ -96,7 +96,7 @@ export class Discourse implements INodeType {
|
||||
// select them easily
|
||||
async getCategories(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
const returnData: INodePropertyOptions[] = [];
|
||||
const { category_list } = await discourseApiRequest.call(this, 'GET', `/categories.json`);
|
||||
const { category_list } = await discourseApiRequest.call(this, 'GET', '/categories.json');
|
||||
for (const category of category_list.categories) {
|
||||
returnData.push({
|
||||
name: category.name,
|
||||
@@ -131,7 +131,7 @@ export class Discourse implements INodeType {
|
||||
text_color: textColor,
|
||||
};
|
||||
|
||||
responseData = await discourseApiRequest.call(this, 'POST', `/categories.json`, body);
|
||||
responseData = await discourseApiRequest.call(this, 'POST', '/categories.json', body);
|
||||
|
||||
responseData = responseData.category;
|
||||
}
|
||||
@@ -139,7 +139,7 @@ export class Discourse implements INodeType {
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
responseData = await discourseApiRequest.call(this, 'GET', `/categories.json`, {}, qs);
|
||||
responseData = await discourseApiRequest.call(this, 'GET', '/categories.json', {}, qs);
|
||||
|
||||
responseData = responseData.category_list.categories;
|
||||
|
||||
@@ -181,7 +181,7 @@ export class Discourse implements INodeType {
|
||||
name,
|
||||
};
|
||||
|
||||
responseData = await discourseApiRequest.call(this, 'POST', `/admin/groups.json`, {
|
||||
responseData = await discourseApiRequest.call(this, 'POST', '/admin/groups.json', {
|
||||
group: body,
|
||||
});
|
||||
|
||||
@@ -199,7 +199,7 @@ export class Discourse implements INodeType {
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
responseData = await discourseApiRequest.call(this, 'GET', `/groups.json`, {}, qs);
|
||||
responseData = await discourseApiRequest.call(this, 'GET', '/groups.json', {}, qs);
|
||||
|
||||
responseData = responseData.groups;
|
||||
|
||||
@@ -237,7 +237,7 @@ export class Discourse implements INodeType {
|
||||
|
||||
Object.assign(body, additionalFields);
|
||||
|
||||
responseData = await discourseApiRequest.call(this, 'POST', `/posts.json`, body);
|
||||
responseData = await discourseApiRequest.call(this, 'POST', '/posts.json', body);
|
||||
}
|
||||
//https://docs.discourse.org/#tag/Posts/paths/~1posts~1{id}.json/get
|
||||
if (operation === 'get') {
|
||||
@@ -250,7 +250,7 @@ export class Discourse implements INodeType {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const limit = this.getNodeParameter('limit', i, 0);
|
||||
|
||||
responseData = await discourseApiRequest.call(this, 'GET', `/posts.json`, {}, qs);
|
||||
responseData = await discourseApiRequest.call(this, 'GET', '/posts.json', {}, qs);
|
||||
responseData = responseData.latest_posts;
|
||||
|
||||
//Getting all posts relying on https://github.com/discourse/discourse_api/blob/main/spec/discourse_api/api/posts_spec.rb
|
||||
@@ -352,7 +352,7 @@ export class Discourse implements INodeType {
|
||||
|
||||
Object.assign(body, additionalFields);
|
||||
|
||||
responseData = await discourseApiRequest.call(this, 'POST', `/users.json`, body);
|
||||
responseData = await discourseApiRequest.call(this, 'POST', '/users.json', body);
|
||||
}
|
||||
//https://docs.discourse.org/#tag/Users/paths/~1users~1{username}.json/get
|
||||
if (operation === 'get') {
|
||||
|
||||
Reference in New Issue
Block a user