@resolveio/server-lib 3.0.4 → 3.1.1
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/collections/method-call.collection.js +0 -3
- package/collections/method-response.collection.js +3 -0
- package/collections/queue-method.collection.js +1 -1
- package/collections/queue-response.collection.js +3 -7
- package/managers/method.manager.js +2 -2
- package/managers/queue-method.manager.js +3 -4
- package/models/method-call.model.d.ts +0 -1
- package/models/method-response.model.d.ts +1 -0
- package/models/queue-method.model.d.ts +1 -1
- package/models/queue-response.model.d.ts +1 -1
- package/package.json +1 -1
- package/server-app.js +4 -2
|
@@ -34,13 +34,6 @@ var schema = {
|
|
|
34
34
|
method: {
|
|
35
35
|
type: String
|
|
36
36
|
},
|
|
37
|
-
method_data: {
|
|
38
|
-
type: Array
|
|
39
|
-
},
|
|
40
|
-
'method_data.$': {
|
|
41
|
-
type: Object,
|
|
42
|
-
blackbox: true
|
|
43
|
-
},
|
|
44
37
|
id_ws: {
|
|
45
38
|
type: String
|
|
46
39
|
},
|
|
@@ -56,6 +49,9 @@ var schema = {
|
|
|
56
49
|
response: {
|
|
57
50
|
type: Object,
|
|
58
51
|
blackbox: true
|
|
52
|
+
},
|
|
53
|
+
date: {
|
|
54
|
+
type: Date
|
|
59
55
|
}
|
|
60
56
|
};
|
|
61
57
|
var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
@@ -184,7 +184,7 @@ var MethodManager = /** @class */ (function () {
|
|
|
184
184
|
message_id: sendItem.data.messageId,
|
|
185
185
|
response: sendItem.data,
|
|
186
186
|
method: sendItem.method,
|
|
187
|
-
|
|
187
|
+
date: sendItem.date
|
|
188
188
|
});
|
|
189
189
|
}
|
|
190
190
|
else {
|
|
@@ -517,7 +517,7 @@ var MethodManager = /** @class */ (function () {
|
|
|
517
517
|
method: method,
|
|
518
518
|
methodData: methodData,
|
|
519
519
|
data: data,
|
|
520
|
-
|
|
520
|
+
date: messageDate
|
|
521
521
|
});
|
|
522
522
|
};
|
|
523
523
|
MethodManager.prototype.sendEmail = function (sendTo, subject, text, html, attachments, send_from) {
|
|
@@ -83,7 +83,7 @@ var QueueMethodManager = /** @class */ (function () {
|
|
|
83
83
|
message_id: sendItem.messageId,
|
|
84
84
|
response: sendItem.response,
|
|
85
85
|
method: sendItem.method,
|
|
86
|
-
|
|
86
|
+
date: sendItem.messageDate
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
else {
|
|
@@ -135,7 +135,7 @@ var QueueMethodManager = /** @class */ (function () {
|
|
|
135
135
|
method_data: data,
|
|
136
136
|
id_user: id_user,
|
|
137
137
|
user: user,
|
|
138
|
-
|
|
138
|
+
date: messageDate
|
|
139
139
|
});
|
|
140
140
|
};
|
|
141
141
|
QueueMethodManager.prototype.runMethodQueue = function (count) {
|
|
@@ -208,10 +208,9 @@ var QueueMethodManager = /** @class */ (function () {
|
|
|
208
208
|
id_user: update.id_user,
|
|
209
209
|
user: update.user,
|
|
210
210
|
messageId: update.messageId,
|
|
211
|
-
method_data: update.method_data,
|
|
212
211
|
response: response,
|
|
213
212
|
method: update.method,
|
|
214
|
-
|
|
213
|
+
date: update.date
|
|
215
214
|
});
|
|
216
215
|
};
|
|
217
216
|
QueueMethodManager.prototype.runMethodResponse = function () {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { CollectionDocument } from './collection-document.model';
|
|
2
2
|
export interface QueueResponseModel extends CollectionDocument {
|
|
3
3
|
method: string;
|
|
4
|
-
method_data: any[];
|
|
5
4
|
id_ws: string;
|
|
6
5
|
messageId: number;
|
|
7
6
|
id_user: string;
|
|
8
7
|
user: string;
|
|
9
8
|
response: any;
|
|
9
|
+
date: Date;
|
|
10
10
|
}
|
package/package.json
CHANGED
package/server-app.js
CHANGED
|
@@ -459,7 +459,8 @@ var ResolveIOMainServer = /** @class */ (function () {
|
|
|
459
459
|
method_response_collection_1.MethodResponses.findOne({ $and: [
|
|
460
460
|
{ id_user: ws['id_user'] },
|
|
461
461
|
{ message_id: messageId },
|
|
462
|
-
{ method: method }
|
|
462
|
+
{ method: method },
|
|
463
|
+
{ date: messageDate }
|
|
463
464
|
] }).exec(function (err, res) {
|
|
464
465
|
if (res) {
|
|
465
466
|
if (ws && ws.readyState === ws.OPEN) {
|
|
@@ -606,7 +607,8 @@ var ResolveIOMainServer = /** @class */ (function () {
|
|
|
606
607
|
method_response_collection_1.MethodResponses.findOne({ $and: [
|
|
607
608
|
{ id_user: ws['id_user'] },
|
|
608
609
|
{ message_id: messageId },
|
|
609
|
-
{ method: method }
|
|
610
|
+
{ method: method },
|
|
611
|
+
{ date: messageDate }
|
|
610
612
|
] }).exec(function (err, res) {
|
|
611
613
|
if (res) {
|
|
612
614
|
if (ws && ws.readyState === ws.OPEN) {
|