fix(Ghost Node): Fix post tags and add credential tests (#3278)

* Renamed Tag IDs to Tags and changed the value to tag.name

* Updated credentials to use new system

* Nodelinter changes
This commit is contained in:
Jonathan Bennetts
2022-05-14 09:39:28 +01:00
committed by GitHub
parent 7090a79b5d
commit a14d85ea48
7 changed files with 79 additions and 46 deletions

View File

@@ -1,5 +1,8 @@
import {
ICredentialDataDecryptedObject,
ICredentialTestRequest,
ICredentialType,
IHttpRequestOptions,
INodeProperties,
} from 'n8n-workflow';
@@ -22,4 +25,18 @@ export class GhostContentApi implements ICredentialType {
default: '',
},
];
async authenticate(credentials: ICredentialDataDecryptedObject, requestOptions: IHttpRequestOptions): Promise<IHttpRequestOptions> {
requestOptions.qs = {
...requestOptions.qs,
'key': credentials.apiKey,
};
return requestOptions;
}
test: ICredentialTestRequest = {
request: {
baseURL: '={{$credentials.url}}',
url: '/ghost/api/v3/content/settings/',
method: 'GET',
},
};
}