|
|
|
@ -22,7 +22,6 @@ function onRequest(context) {
|
|
|
|
|
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
|
|
|
|
|
|
|
|
|
|
var groupName = request.getParameter("groupName");
|
|
|
|
|
var groupOwner = request.getParameter("groupOwner");
|
|
|
|
|
var groupId = request.getParameter("groupId");
|
|
|
|
|
|
|
|
|
|
var viewModel = {};
|
|
|
|
@ -42,9 +41,9 @@ function onRequest(context) {
|
|
|
|
|
}
|
|
|
|
|
viewModel.currentUser = currentUser;
|
|
|
|
|
var deviceCount = 0;
|
|
|
|
|
if (groupId && groupOwner) {
|
|
|
|
|
if (groupId) {
|
|
|
|
|
var groupModule = require("/app/modules/business-controllers/group.js")["groupModule"];
|
|
|
|
|
deviceCount = groupModule.getGroupDeviceCount(groupId, groupOwner);
|
|
|
|
|
deviceCount = groupModule.getGroupDeviceCount(groupId);
|
|
|
|
|
} else {
|
|
|
|
|
deviceCount = deviceModule.getDevicesCount();
|
|
|
|
|
}
|
|
|
|
|