mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
⚡ Improvements to PagerDuty-Node
This commit is contained in:
@@ -26,7 +26,13 @@ export class PagerDutyOAuth2Api implements ICredentialType {
|
|||||||
displayName: 'Auth URI Query Parameters',
|
displayName: 'Auth URI Query Parameters',
|
||||||
name: 'authQueryParameters',
|
name: 'authQueryParameters',
|
||||||
type: 'hidden' as NodePropertyTypes,
|
type: 'hidden' as NodePropertyTypes,
|
||||||
default: 'grant_type=authorization_code',
|
default: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Scope',
|
||||||
|
name: 'scope',
|
||||||
|
type: 'hidden' as NodePropertyTypes,
|
||||||
|
default: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authentication',
|
displayName: 'Authentication',
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export async function pagerDutyApiRequest(this: IExecuteFunctions | IWebhookFunc
|
|||||||
options.headers = Object.assign({}, options.headers, headers);
|
options.headers = Object.assign({}, options.headers, headers);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (authenticationMethod === 'accessToken') {
|
if (authenticationMethod === 'apiToken') {
|
||||||
const credentials = this.getCredentials('pagerDutyApi');
|
const credentials = this.getCredentials('pagerDutyApi');
|
||||||
|
|
||||||
if (credentials === undefined) {
|
if (credentials === undefined) {
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ export class PagerDuty implements INodeType {
|
|||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
authentication: [
|
authentication: [
|
||||||
'accessToken',
|
'apiToken',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -93,15 +93,15 @@ export class PagerDuty implements INodeType {
|
|||||||
type: 'options',
|
type: 'options',
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
name: 'Access Token',
|
name: 'API Token',
|
||||||
value: 'accessToken',
|
value: 'apiToken',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'OAuth2',
|
name: 'OAuth2',
|
||||||
value: 'oAuth2',
|
value: 'oAuth2',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
default: 'accessToken',
|
default: 'apiToken',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Resource',
|
displayName: 'Resource',
|
||||||
|
|||||||
Reference in New Issue
Block a user