@smpx/koa-request 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/Request.js +12 -5
- package/package.json +1 -1
package/Request.js
CHANGED
|
@@ -654,11 +654,16 @@ class Request {
|
|
|
654
654
|
let [os, appVersion, installId] = infoStr.split(separator);
|
|
655
655
|
os = os.toLowerCase();
|
|
656
656
|
|
|
657
|
-
const appInfo = {
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
657
|
+
const appInfo = {};
|
|
658
|
+
if (os) {
|
|
659
|
+
appInfo.os = os;
|
|
660
|
+
}
|
|
661
|
+
if (appVersion) {
|
|
662
|
+
appInfo.appVersion = appVersion;
|
|
663
|
+
}
|
|
664
|
+
if (installId) {
|
|
665
|
+
appInfo.installId = installId;
|
|
666
|
+
}
|
|
662
667
|
|
|
663
668
|
if (this.appPlatforms().has(os)) {
|
|
664
669
|
appInfo.appType = 'app';
|
|
@@ -760,6 +765,8 @@ class Request {
|
|
|
760
765
|
else if (!appInfo.deviceType) {
|
|
761
766
|
appInfo.deviceType = this._getDeviceType();
|
|
762
767
|
}
|
|
768
|
+
|
|
769
|
+
return appInfo;
|
|
763
770
|
}
|
|
764
771
|
|
|
765
772
|
/*
|