diff --git a/packages/nodes-base/credentials/StrapiApi.credentials.ts b/packages/nodes-base/credentials/StrapiApi.credentials.ts index 395bbc7f9d..801503193c 100644 --- a/packages/nodes-base/credentials/StrapiApi.credentials.ts +++ b/packages/nodes-base/credentials/StrapiApi.credentials.ts @@ -17,6 +17,9 @@ export class StrapiApi implements ICredentialType { displayName: 'Password', name: 'password', type: 'string' as NodePropertyTypes, + typeOptions: { + password: true, + }, default: '', }, { @@ -24,6 +27,7 @@ export class StrapiApi implements ICredentialType { name: 'url', type: 'string' as NodePropertyTypes, default: '', + placeholder: 'https://api.example.com', }, ]; } diff --git a/packages/nodes-base/nodes/Strapi/EntryDescription.ts b/packages/nodes-base/nodes/Strapi/EntryDescription.ts index 293304a929..7305aa6ce7 100644 --- a/packages/nodes-base/nodes/Strapi/EntryDescription.ts +++ b/packages/nodes-base/nodes/Strapi/EntryDescription.ts @@ -66,7 +66,7 @@ export const entryFields = [ ], }, }, - description: 'Name of the content type', + description: 'Name of the content type.', }, { displayName: 'Columns', @@ -86,6 +86,7 @@ export const entryFields = [ placeholder: 'id,name,description', description: 'Comma separated list of the properties which should used as columns for the new rows.', }, + /* -------------------------------------------------------------------------- */ /* entry:delete */ /* -------------------------------------------------------------------------- */ @@ -105,7 +106,7 @@ export const entryFields = [ ], }, }, - description: 'Name of the content type', + description: 'Name of the content type.', }, { displayName: 'Entry ID', @@ -123,8 +124,9 @@ export const entryFields = [ ], }, }, - description: 'The ID of the entry to get.', + description: 'The ID of the entry to delete.', }, + /* -------------------------------------------------------------------------- */ /* entry:get */ /* -------------------------------------------------------------------------- */ @@ -144,7 +146,7 @@ export const entryFields = [ ], }, }, - description: 'Name of the content type', + description: 'Name of the content type.', }, { displayName: 'Entry ID', @@ -164,6 +166,7 @@ export const entryFields = [ }, description: 'The ID of the entry to get.', }, + /* -------------------------------------------------------------------------- */ /* entry:getAll */ /* -------------------------------------------------------------------------- */ @@ -286,6 +289,7 @@ export const entryFields = [ }, ], }, + /* -------------------------------------------------------------------------- */ /* entry:update */ /* -------------------------------------------------------------------------- */ @@ -305,7 +309,7 @@ export const entryFields = [ ], }, }, - description: 'Name of the content type', + description: 'Name of the content type.', }, { displayName: 'Update Key', diff --git a/packages/nodes-base/nodes/Strapi/GenericFunctions.ts b/packages/nodes-base/nodes/Strapi/GenericFunctions.ts index 6431ad0bd9..e6061998e3 100644 --- a/packages/nodes-base/nodes/Strapi/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Strapi/GenericFunctions.ts @@ -16,7 +16,7 @@ import { export async function strapiApiRequest(this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions | IWebhookFunctions, method: string, resource: string, body: any = {}, qs: IDataObject = {}, uri?: string, headers: IDataObject = {}): Promise { // tslint:disable-line:no-any const credentials = this.getCredentials('strapiApi') as IDataObject; - + try { const options: OptionsWithUri = { headers: { diff --git a/packages/nodes-base/nodes/Strapi/Strapi.node.ts b/packages/nodes-base/nodes/Strapi/Strapi.node.ts index 3b38ae7aad..3a973a1f99 100644 --- a/packages/nodes-base/nodes/Strapi/Strapi.node.ts +++ b/packages/nodes-base/nodes/Strapi/Strapi.node.ts @@ -92,7 +92,7 @@ export class Strapi implements INodeType { } } responseData = await strapiApiRequest.call(this, 'POST', `/${contentType}`, body, qs); - + returnData.push(responseData); } } @@ -102,7 +102,7 @@ export class Strapi implements INodeType { const contentType = this.getNodeParameter('contentType', i) as string; const entryId = this.getNodeParameter('entryId', i) as string; - + responseData = await strapiApiRequest.call(this, 'DELETE', `/${contentType}/${entryId}`, {}, qs); returnData.push(responseData); @@ -140,7 +140,7 @@ export class Strapi implements INodeType { responseData = await strapiApiRequestAllItems.call(this, 'GET', `/${contentType}`, {}, qs); } else { qs._limit = this.getNodeParameter('limit', i) as number; - + responseData = await strapiApiRequest.call(this, 'GET', `/${contentType}`, {}, qs); } returnData.push.apply(returnData, responseData); @@ -181,7 +181,7 @@ export class Strapi implements INodeType { } } responseData = await strapiApiRequest.call(this, 'PUT', `/${contentType}/${entryId}`, body, qs); - + returnData.push(responseData); } }