@cocreate/usage 1.0.0 → 1.1.0
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.
- package/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/src/index.js +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# [1.1.0](https://github.com/CoCreate-app/CoCreate-usage/compare/v1.0.0...v1.1.0) (2024-01-08)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* applied host to define environment/branch ([8d7404c](https://github.com/CoCreate-app/CoCreate-usage/commit/8d7404ca75eeece4a17a9477d25101ccdab0a8ed))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* bumped CoCreate dependencies to their latest versions ([6e0b814](https://github.com/CoCreate-app/CoCreate-usage/commit/6e0b814e6afda547fceca6b7248ea5181de7843b))
|
|
12
|
+
|
|
1
13
|
# 1.0.0 (2023-11-29)
|
|
2
14
|
|
|
3
15
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -26,7 +26,7 @@ class CoCreateUsage {
|
|
|
26
26
|
|
|
27
27
|
org = {}
|
|
28
28
|
org.debounce = setTimeout(() => {
|
|
29
|
-
self.send(org, organization_id); // Call the callback to display the count
|
|
29
|
+
self.send(org, organization_id, data.host); // Call the callback to display the count
|
|
30
30
|
self.organizations.delete(organization_id)
|
|
31
31
|
}, 60000);
|
|
32
32
|
|
|
@@ -54,7 +54,7 @@ class CoCreateUsage {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
async send(org, organization_id) {
|
|
57
|
+
async send(org, organization_id, host) {
|
|
58
58
|
delete org.debounce
|
|
59
59
|
|
|
60
60
|
org.dataTransferedOut += 250
|
|
@@ -63,6 +63,7 @@ class CoCreateUsage {
|
|
|
63
63
|
const platformOrganization = this.crud.config.organization_id
|
|
64
64
|
let organization = await this.crud.send({
|
|
65
65
|
method: 'object.read',
|
|
66
|
+
host: this.crud.config.host,
|
|
66
67
|
array: 'organizations',
|
|
67
68
|
object: { _id: organization_id },
|
|
68
69
|
organization_id: platformOrganization
|
|
@@ -103,6 +104,7 @@ class CoCreateUsage {
|
|
|
103
104
|
isResetDataTransfer = true
|
|
104
105
|
this.crud.send({
|
|
105
106
|
method: 'object.create',
|
|
107
|
+
host: this.crud.config.host,
|
|
106
108
|
array: 'transactions',
|
|
107
109
|
object: {
|
|
108
110
|
organization_id,
|
|
@@ -130,6 +132,7 @@ class CoCreateUsage {
|
|
|
130
132
|
|
|
131
133
|
let balanceUpdate = {
|
|
132
134
|
method: 'object.update',
|
|
135
|
+
host: this.crud.config.host,
|
|
133
136
|
array: 'organizations',
|
|
134
137
|
object: { _id: organization_id },
|
|
135
138
|
organization_id: platformOrganization,
|
|
@@ -154,6 +157,7 @@ class CoCreateUsage {
|
|
|
154
157
|
|
|
155
158
|
let transaction = {
|
|
156
159
|
method: 'object.create',
|
|
160
|
+
host,
|
|
157
161
|
array: 'transactions',
|
|
158
162
|
object: {
|
|
159
163
|
organization_id,
|