@vasrefil/api-toolkit 1.2.5 → 1.2.6
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.
|
@@ -19,7 +19,6 @@ class LogUtil_ {
|
|
|
19
19
|
const response = this.get_user_event_response(dto.serviceResponse);
|
|
20
20
|
const payload = {
|
|
21
21
|
distinct_id: user.distinct_id,
|
|
22
|
-
service_name: env_1.default.SERVICE_NAME,
|
|
23
22
|
request: json_stringify_safe(request, null),
|
|
24
23
|
response: json_stringify_safe(response, null),
|
|
25
24
|
request_url: request?.url,
|
|
@@ -33,7 +32,7 @@ class LogUtil_ {
|
|
|
33
32
|
catch (error) {
|
|
34
33
|
airbrake_1.airbrake.notify({
|
|
35
34
|
error: json_stringify_safe(error, null),
|
|
36
|
-
context: { component: 'USER_EVENT' },
|
|
35
|
+
context: { component: 'USER_EVENT', service_name: env_1.default.SERVICE_NAME },
|
|
37
36
|
params: { actionType, status, request },
|
|
38
37
|
});
|
|
39
38
|
}
|
|
@@ -53,7 +52,7 @@ class LogUtil_ {
|
|
|
53
52
|
console.log(error);
|
|
54
53
|
airbrake_1.airbrake.notify({
|
|
55
54
|
error: json_stringify_safe(error, null),
|
|
56
|
-
context: { component: 'APP_LOG' },
|
|
55
|
+
context: { component: 'APP_LOG', service_name: env_1.default.SERVICE_NAME },
|
|
57
56
|
});
|
|
58
57
|
}
|
|
59
58
|
};
|
|
@@ -103,7 +102,10 @@ class LogUtil_ {
|
|
|
103
102
|
const resp = await (0, api_request_util_1.LogApiRequest)({
|
|
104
103
|
method: 'POST',
|
|
105
104
|
endpoint: 'activities',
|
|
106
|
-
body
|
|
105
|
+
body: {
|
|
106
|
+
...body,
|
|
107
|
+
service_name: env_1.default.SERVICE_NAME,
|
|
108
|
+
}
|
|
107
109
|
});
|
|
108
110
|
return resp;
|
|
109
111
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vasrefil/api-toolkit",
|
|
3
3
|
"description": "This is Vasrefil API toolkit",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.6",
|
|
5
5
|
"author": "Sodiq Alabi",
|
|
6
6
|
"main": "dist/public-api.js",
|
|
7
7
|
"types": "dist/public-api.d.ts",
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@airbrake/node": "^2.1.8",
|
|
22
22
|
"@types/jsonwebtoken": "^8.5.0",
|
|
23
|
-
"@vasrefil/api-toolkit": "^1.2.4",
|
|
24
23
|
"axios": "^1.7.8",
|
|
25
24
|
"chalk": "^4.1.0",
|
|
26
25
|
"cors": "^2.8.5",
|