Added description and fixed issue with colors (#686)

This commit is contained in:
Ricardo Espinoza
2020-06-20 11:51:11 -04:00
committed by GitHub
parent 5db2ce2924
commit 6d7368d723
3 changed files with 30 additions and 6 deletions

View File

@@ -97,16 +97,16 @@ export class GoogleCalendar implements INodeType {
this: ILoadOptionsFunctions
): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const { calendar } = await googleApiRequest.call(
const { event } = await googleApiRequest.call(
this,
'GET',
'/calendar/v3/colors'
);
for (const key of Object.keys(calendar)) {
const colorName = calendar[key].background;
for (const key of Object.keys(event)) {
const colorName = `Background: ${event[key].background} - Foreground: ${event[key].foreground}`;
const colorId = key;
returnData.push({
name: `${colorName} - ${colorId}`,
name: `${colorName}`,
value: colorId
});
}