@resolveio/server-lib 1.0.1 → 1.0.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.
- package/package.json +1 -1
- package/server-app.js +41 -41
package/package.json
CHANGED
package/server-app.js
CHANGED
|
@@ -477,47 +477,47 @@ var ResolveIOMainServer = /** @class */ (function () {
|
|
|
477
477
|
}
|
|
478
478
|
else if (type === 'methodResponse') {
|
|
479
479
|
method = data.shift();
|
|
480
|
-
if (method !== 'generatePDF' && method !== 'getWOOfflineData' &&
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
}
|
|
508
|
-
else {
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
}
|
|
480
|
+
// if (method !== 'generatePDF' && method !== 'getWOOfflineData' &&method !== 'countQuery' && method !== 'countCollectionWithQuery' && method !== 'find' && method !== 'findOne' && method !== 'findWithOptions' && method !== 'setWSAppVersion') {
|
|
481
|
+
// if (getBinarySize(JSON.stringify(data)) < 200000) {
|
|
482
|
+
// Logs.create({
|
|
483
|
+
// _id: Types.ObjectId().toHexString(),
|
|
484
|
+
// date: new Date(),
|
|
485
|
+
// type: 'client-request',
|
|
486
|
+
// title: 'Client Request - Method Response',
|
|
487
|
+
// message: 'User: ' + ws['user'] + ', Type: ' + type + ', MessageId: ' + messageId + ', Method: ' + method,
|
|
488
|
+
// payload: data,
|
|
489
|
+
// method: method,
|
|
490
|
+
// user: ws['user'],
|
|
491
|
+
// messageId: messageId
|
|
492
|
+
// });
|
|
493
|
+
// }
|
|
494
|
+
// else {
|
|
495
|
+
// Logs.create({
|
|
496
|
+
// _id: Types.ObjectId().toHexString(),
|
|
497
|
+
// date: new Date(),
|
|
498
|
+
// type: 'client-request',
|
|
499
|
+
// title: 'Client Request - Method Response',
|
|
500
|
+
// message: 'User: ' + ws['user'] + ', Type: ' + type + ', MessageId: ' + messageId + ', Method: ' + method,
|
|
501
|
+
// payload: 'Too Big',
|
|
502
|
+
// method: method,
|
|
503
|
+
// user: ws['user'],
|
|
504
|
+
// messageId: messageId
|
|
505
|
+
// });
|
|
506
|
+
// }
|
|
507
|
+
// }
|
|
508
|
+
// else {
|
|
509
|
+
// Logs.create({
|
|
510
|
+
// _id: Types.ObjectId().toHexString(),
|
|
511
|
+
// date: new Date(),
|
|
512
|
+
// type: 'client-request',
|
|
513
|
+
// title: 'Client Request - Method Response',
|
|
514
|
+
// message: 'User: ' + ws['user'] + ', Type: ' + type + ', MessageId: ' + messageId + ', Method: ' + method,
|
|
515
|
+
// payload: 'Too Big',
|
|
516
|
+
// method: method,
|
|
517
|
+
// user: ws['user'],
|
|
518
|
+
// messageId: messageId
|
|
519
|
+
// });
|
|
520
|
+
// }
|
|
521
521
|
method_response_collection_1.MethodResponses.findOne({ $and: [
|
|
522
522
|
{ id_user: ws['id_user'] },
|
|
523
523
|
{ message_id: messageId },
|