Improvements to PagerDuty-Node

This commit is contained in:
ricardo 2020-06-14 21:39:30 -04:00
parent 4dac84f506
commit acfc4fc39d
3 changed files with 12 additions and 6 deletions

View file

@ -26,7 +26,13 @@ export class PagerDutyOAuth2Api implements ICredentialType {
displayName: 'Auth URI Query Parameters',
name: 'authQueryParameters',
type: 'hidden' as NodePropertyTypes,
default: 'grant_type=authorization_code',
default: '',
},
{
displayName: 'Scope',
name: 'scope',
type: 'hidden' as NodePropertyTypes,
default: '',
},
{
displayName: 'Authentication',

View file

@ -45,7 +45,7 @@ export async function pagerDutyApiRequest(this: IExecuteFunctions | IWebhookFunc
options.headers = Object.assign({}, options.headers, headers);
try {
if (authenticationMethod === 'accessToken') {
if (authenticationMethod === 'apiToken') {
const credentials = this.getCredentials('pagerDutyApi');
if (credentials === undefined) {

View file

@ -69,7 +69,7 @@ export class PagerDuty implements INodeType {
displayOptions: {
show: {
authentication: [
'accessToken',
'apiToken',
],
},
},
@ -93,15 +93,15 @@ export class PagerDuty implements INodeType {
type: 'options',
options: [
{
name: 'Access Token',
value: 'accessToken',
name: 'API Token',
value: 'apiToken',
},
{
name: 'OAuth2',
value: 'oAuth2',
},
],
default: 'accessToken',
default: 'apiToken',
},
{
displayName: 'Resource',