Skip to content

Commit 4499d12

Browse files
committed
fixed error which blocks profile and change password pages
1 parent b0e2e8c commit 4499d12

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

www/routes/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var connect_to_db = function( cb ){
2424

2525

2626
var is_loggedin = function( req, res, redirect=null){
27-
auth.checkLogin( req, res, redirect );
27+
return auth.checkLogin( req, res, redirect );
2828
};
2929

3030
router.all("/info/*", function( req, res, next ){
@@ -198,16 +198,16 @@ router.get("/profile", function (req, res, next) {
198198
msg = {};
199199
}
200200
version = "MMT-Operator: " + config.version
201-
+ "\nMMT-Probe: " + msg[ dataAdaptor.LicenseColumnId.VERSION_PROBE]
202-
+ "\nMMT-SDK: " + msg[ dataAdaptor.LicenseColumnId.VERSION_SDK]
201+
+ "\nMMT-Probe: " + (msg[ dataAdaptor.LicenseColumnId.VERSION_PROBE] || "na")
202+
+ "\nMMT-SDK: " + (msg[ dataAdaptor.LicenseColumnId.VERSION_SDK] || "na")
203203

204204

205205
res.render('profile', {
206206
title : 'Profile',
207207
version : version,
208208
//version : " MMT-Operator 1.6.5-5dc7f4f,\n MMT-Probe 1.2.1-b5876c7,\n MMT-Security 1.1.4-8c20261,\n MMT-DPI 1.6.8.1-47e533f",
209-
deviceID : msg[ dataAdaptor.LicenseColumnId.MAC_ADDRESSES ],
210-
expiredOn : (new Date(msg[ dataAdaptor.LicenseColumnId.EXPIRY_DATE ])).toString(),
209+
deviceID : (msg[ dataAdaptor.LicenseColumnId.MAC_ADDRESSES ] || "na"),
210+
expiredOn : (new Date(msg[ dataAdaptor.LicenseColumnId.EXPIRY_DATE ] || 0)).toString(),
211211
});
212212
} );
213213

0 commit comments

Comments
 (0)