@vasrefil/api-toolkit 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -24,7 +24,7 @@ class GoMailerUtil_ {
|
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
catch (error) {
|
|
27
|
-
console.log('GoMailerUtil_send_event:error', error);
|
|
27
|
+
// console.log('GoMailerUtil_send_event:error', error);
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
this.send_user_event = async (payload) => {
|
|
@@ -43,11 +43,10 @@ class GoMailerUtil_ {
|
|
|
43
43
|
transaction_status: transaction?.status || ''
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
|
-
|
|
47
|
-
return resp;
|
|
46
|
+
await this.trigger_event(body);
|
|
48
47
|
}
|
|
49
48
|
catch (error) {
|
|
50
|
-
|
|
49
|
+
// console.log(error);
|
|
51
50
|
}
|
|
52
51
|
};
|
|
53
52
|
this.trigger_event = async (payload) => {
|
|
@@ -55,7 +54,6 @@ class GoMailerUtil_ {
|
|
|
55
54
|
const headers = { Authorization: `Bearer ${env_1.default.GO_MAILER.API_KEY}` };
|
|
56
55
|
const url = 'https://automata.go-mailer.com/api/v1/events/trigger';
|
|
57
56
|
const { data } = await axios_1.default.post(url, payload, { headers });
|
|
58
|
-
console.log('GoMailerUtil_trigger_event:success', data);
|
|
59
57
|
return data;
|
|
60
58
|
}
|
|
61
59
|
catch (error) {
|
|
@@ -68,7 +66,7 @@ class GoMailerUtil_ {
|
|
|
68
66
|
category: "SEND_EVENT",
|
|
69
67
|
subcategory: "GO_MAILER_SEND_EVENT",
|
|
70
68
|
});
|
|
71
|
-
console.log('GoMailerUtil_trigger_event:error', error);
|
|
69
|
+
// console.log('GoMailerUtil_trigger_event:error', error);
|
|
72
70
|
throw err;
|
|
73
71
|
}
|
|
74
72
|
};
|