Now tags are loaded for the user (contactTag:add) (#1267)

This commit is contained in:
Ricardo Espinoza
2020-12-23 02:23:40 -05:00
committed by GitHub
parent f36af0fcfd
commit 0f0e67eb30
2 changed files with 17 additions and 1 deletions

View File

@@ -298,6 +298,19 @@ export class ActiveCampaign implements INodeType {
}
return returnData;
},
// Get all the available tags to display them to user so that he can
// select them easily
async getTags(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const { tags } = await activeCampaignApiRequest.call(this, 'GET', '/api/3/tags', {});
for (const tag of tags) {
returnData.push({
name: tag.tag,
value: tag.id,
});
}
return returnData;
},
},
};