fix(Toggl Trigger Node): Update API version (#10207)

This commit is contained in:
Jon
2024-08-21 10:43:48 +01:00
committed by GitHub
parent 09c3a8b367
commit 9bdb1d6dca
3 changed files with 28 additions and 16 deletions

View File

@@ -1,4 +1,9 @@
import type { ICredentialType, INodeProperties } from 'n8n-workflow';
import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class TogglApi implements ICredentialType {
name = 'togglApi';
@@ -9,7 +14,7 @@ export class TogglApi implements ICredentialType {
properties: INodeProperties[] = [
{
displayName: 'Username',
displayName: 'Email Address',
name: 'username',
type: 'string',
default: '',
@@ -22,4 +27,21 @@ export class TogglApi implements ICredentialType {
default: '',
},
];
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
auth: {
username: '={{$credentials.username}}',
password: '={{$credentials.password}}',
},
},
};
test: ICredentialTestRequest = {
request: {
baseURL: 'https://api.track.toggl.com/api/v9',
url: '/me',
},
};
}