Skip to content

Commit 027c9f3

Browse files
committed
fix path in source url of output port in Find/List components
1 parent 1082559 commit 027c9f3

File tree

8 files changed

+50
-41
lines changed

8 files changed

+50
-41
lines changed

src/appmixer/googleContacts/core/FindContacts/component.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
{
6868
"name": "out",
6969
"source": {
70-
"url": "/component/appmixer/googleContacts/FindContacts?outPort=out",
70+
"url": "/component/appmixer/googleContacts/core/FindContacts?outPort=out",
7171
"data": {
7272
"properties": {
7373
"generateOutputPortOptions": true

src/appmixer/googleContacts/core/FindDirectoryContacts/component.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
{
6868
"name": "out",
6969
"source": {
70-
"url": "/component/appmixer/googleContacts/FindDirectoryContacts?outPort=out",
70+
"url": "/component/appmixer/googleContacts/core/FindDirectoryContacts?outPort=out",
7171
"data": {
7272
"properties": {
7373
"generateOutputPortOptions": true

src/appmixer/googleContacts/core/ListContactGroups/ListContactGroups.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,19 @@ module.exports = {
2020
}
2121
});
2222

23-
const records = data.contactGroups.map((contactGroup) => {
24-
return {
25-
id: contactGroup.resourceName.split('/')[1],
26-
etag: contactGroup.etag ?? undefined,
27-
updateTime: contactGroup.metadata?.updateTime,
28-
groupType: contactGroup.groupType,
29-
name: contactGroup.name,
30-
formattedName: contactGroup.formattedName
31-
};
32-
});
23+
let records = [];
24+
if (Array.isArray(data.contactGroup) || data.contactGroups?.length) {
25+
records = data.contactGroups.map((contactGroup) => {
26+
return {
27+
id: contactGroup.resourceName.split('/')[1],
28+
etag: contactGroup.etag ?? undefined,
29+
updateTime: contactGroup.metadata?.updateTime,
30+
groupType: contactGroup.groupType,
31+
name: contactGroup.name,
32+
formattedName: contactGroup.formattedName
33+
};
34+
});
35+
}
3336

3437
return lib.sendArrayOutput({ context, records, outputType });
3538
}

src/appmixer/googleContacts/core/ListContactGroups/component.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
{
5757
"name": "out",
5858
"source": {
59-
"url": "/component/appmixer/googleContacts/ListContactGroups?outPort=out",
59+
"url": "/component/appmixer/googleContacts/core/ListContactGroups?outPort=out",
6060
"data": {
6161
"properties": {
6262
"generateOutputPortOptions": true

src/appmixer/googleContacts/core/ListMyContacts/ListMyContacts.js

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,22 @@ module.exports = {
2424
}
2525
});
2626

27-
const records = data.connections.map((contact) => {
28-
return {
29-
id: contact.resourceName.split('/')[1],
30-
etag: contact.etag,
31-
updateTime: contact.metadata.sources[0].updateTime,
32-
displayName: contact.names[0].displayName,
33-
givenName: contact.names[0].givenName,
34-
displayNameLastFirst: contact.names[0].displayNameLastFirst,
35-
unstructuredName: contact.names[0].unstructuredName,
36-
photoUrl: contact.photos[0].url,
37-
memberships: contact.memberships
38-
};
39-
});
27+
let records = [];
28+
if (Array.isArray(data.contactGroup) || data.contactGroups?.length) {
29+
records = data.connections.map((contact) => {
30+
return {
31+
id: contact.resourceName.split('/')[1],
32+
etag: contact.etag,
33+
updateTime: contact.metadata.sources[0].updateTime,
34+
displayName: contact.names[0].displayName,
35+
givenName: contact.names[0].givenName,
36+
displayNameLastFirst: contact.names[0].displayNameLastFirst,
37+
unstructuredName: contact.names[0].unstructuredName,
38+
photoUrl: contact.photos[0].url,
39+
memberships: contact.memberships
40+
};
41+
});
42+
}
4043

4144
return lib.sendArrayOutput({ context, records, outputType });
4245
}

src/appmixer/googleContacts/core/ListMyContacts/component.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
{
8383
"name": "out",
8484
"source": {
85-
"url": "/component/appmixer/googleContacts/ListMyContacts?outPort=out",
85+
"url": "/component/appmixer/googleContacts/core/ListMyContacts?outPort=out",
8686
"data": {
8787
"properties": {
8888
"generateOutputPortOptions": true

src/appmixer/googleContacts/core/ListOtherContacts/ListOtherContacts.js

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,22 @@ module.exports = {
2323
}
2424
});
2525

26-
const records = data.otherContacts.map((contact) => {
27-
return {
28-
id: contact.resourceName.split('/')[1],
29-
etag: contact.etag,
30-
updateTime: contact.metadata.sources[0].updateTime,
31-
displayName: contact.names[0].displayName,
32-
givenName: contact.names[0].givenName,
33-
displayNameLastFirst: contact.names[0].displayNameLastFirst,
34-
unstructuredName: contact.names[0].unstructuredName,
35-
photoUrl: contact.photos[0].url,
36-
memberships: contact.memberships
37-
};
38-
});
26+
let records = [];
27+
if (Array.isArray(data.contactGroup) || data.contactGroups?.length) {
28+
records = data.otherContacts.map((contact) => {
29+
return {
30+
id: contact.resourceName.split('/')[1],
31+
etag: contact.etag,
32+
updateTime: contact.metadata.sources[0].updateTime,
33+
displayName: contact.names[0].displayName,
34+
givenName: contact.names[0].givenName,
35+
displayNameLastFirst: contact.names[0].displayNameLastFirst,
36+
unstructuredName: contact.names[0].unstructuredName,
37+
photoUrl: contact.photos[0].url,
38+
memberships: contact.memberships
39+
};
40+
});
41+
}
3942

4043
return lib.sendArrayOutput({ context, records, outputType });
4144
}

src/appmixer/googleContacts/core/ListOtherContacts/component.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
{
5757
"name": "out",
5858
"source": {
59-
"url": "/component/appmixer/googleContacts/ListOtherContacts?outPort=out",
59+
"url": "/component/appmixer/googleContacts/core/ListOtherContacts?outPort=out",
6060
"data": {
6161
"properties": {
6262
"generateOutputPortOptions": true

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy