Skip to content

Commit 2e27e83

Browse files
committed
Revert close search-leads action to upstream master version
1 parent 5d3fa03 commit 2e27e83

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

components/close/actions/search-leads/search-leads.mjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import close from "../../close.app.mjs";
2+
import utils from "../../common/utils.mjs";
23

34
export default {
45
type: "action",
@@ -25,6 +26,16 @@ export default {
2526
},
2627
},
2728
async run({ $ }) {
29+
const data = {};
30+
if (this.name) data.name = this.name;
31+
if (this.url) data.url = this.url;
32+
if (this.statusId) data.status_id = this.statusId;
33+
if (this.contacts) data.contacts = utils.parseObject(this.contacts);
34+
if (this.addresses) data.addresses = utils.parseObject(this.addresses);
35+
const moreFields = {};
36+
for (let key in this.moreFields) {
37+
moreFields[key] = utils.parseObject(this.moreFields[key]);
38+
}
2839
const response = await this.close.searchLeads({
2940
data: {
3041
query: {

0 commit comments

Comments
 (0)