Remove unneeded scopes

This commit is contained in:
Iván Ovejero 2021-01-29 16:45:05 -03:00
parent a557c947ed
commit 3b8d5cdea4
2 changed files with 3 additions and 11 deletions

View file

@ -6,13 +6,7 @@ import {
const scopes = [ const scopes = [
'identity', 'identity',
'edit', 'edit',
'flair',
'history', 'history',
'modconfig',
'modflair',
'modlog',
'modposts',
'modwiki',
'mysubreddits', 'mysubreddits',
'privatemessages', 'privatemessages',
'read', 'read',
@ -21,8 +15,6 @@ const scopes = [
'submit', 'submit',
'subscribe', 'subscribe',
'vote', 'vote',
'wikiedit',
'wikiread',
]; ];
// https://github.com/reddit-archive/reddit/wiki/OAuth2 // https://github.com/reddit-archive/reddit/wiki/OAuth2

View file

@ -61,9 +61,9 @@ export class Reddit implements INodeType {
displayOptions: { displayOptions: {
show: { show: {
resource: [ resource: [
'profile',
'comment', 'comment',
'post', 'post',
'profile',
], ],
}, },
}, },
@ -134,8 +134,8 @@ export class Reddit implements INodeType {
// ---------------------------------- // ----------------------------------
const qs: IDataObject = { const qs: IDataObject = {
thing_id: this.getNodeParameter('targetId', i),
text: this.getNodeParameter('text', i), text: this.getNodeParameter('text', i),
thing_id: this.getNodeParameter('targetId', i),
}; };
responseData = await redditApiRequest.call(this, 'POST', 'api/comment', qs); responseData = await redditApiRequest.call(this, 'POST', 'api/comment', qs);
@ -152,7 +152,7 @@ export class Reddit implements INodeType {
if (operation === 'get') { if (operation === 'get') {
const endpoints: {[key: string]: string} = { const endpoints: { [key: string]: string } = {
identity: 'me', identity: 'me',
blockedUsers: 'me/blocked', blockedUsers: 'me/blocked',
friends: 'me/friends', friends: 'me/friends',