fixing getowner() according to cdmf device object refactoring

application-manager-new
Rasika Perera 9 years ago
parent e055e79ea4
commit 201ff62664

@ -179,7 +179,7 @@ deviceModule = function () {
var data = {}; var data = {};
//XMLHTTPRequest's POST //XMLHTTPRequest's POST
//log.info(updateDeviceEndpoint+ "?name="+device.name); //log.info(updateDeviceEndpoint+ "?name="+device.name);
return post(updateDeviceEndpoint+ "?name="+encodeURIComponent(device.name), data, "text"); return post(updateDeviceEndpoint + "?name=" + encodeURIComponent(device.name), data, "text");
}; };
/* /*
@ -257,8 +257,8 @@ deviceModule = function () {
var deviceObject = {}; var deviceObject = {};
deviceObject[constants.DEVICE_IDENTIFIER] = device.getDeviceIdentifier(); deviceObject[constants.DEVICE_IDENTIFIER] = device.getDeviceIdentifier();
deviceObject[constants.DEVICE_NAME] = privateMethods.validateAndReturn(device.getName()); deviceObject[constants.DEVICE_NAME] = privateMethods.validateAndReturn(device.getName());
deviceObject[constants.DEVICE_OWNERSHIP] = privateMethods.validateAndReturn(device.getOwnership()); deviceObject[constants.DEVICE_OWNERSHIP] = privateMethods.validateAndReturn(device.getEnrolmentInfo().getOwnership());
deviceObject[constants.DEVICE_OWNER] = device.getOwner(); deviceObject[constants.DEVICE_OWNER] = device.getEnrolmentInfo().getOwner();
deviceObject[constants.DEVICE_TYPE] = device.getType(); deviceObject[constants.DEVICE_TYPE] = device.getType();
if (device.getType() == constants.PLATFORM_IOS) { if (device.getType() == constants.PLATFORM_IOS) {
properties[constants.DEVICE_MODEL] = properties[constants.DEVICE_PRODUCT]; properties[constants.DEVICE_MODEL] = properties[constants.DEVICE_PRODUCT];
@ -266,7 +266,7 @@ deviceModule = function () {
properties[constants.DEVICE_VENDOR] = constants.VENDOR_APPLE; properties[constants.DEVICE_VENDOR] = constants.VENDOR_APPLE;
} }
deviceObject[constants.DEVICE_PROPERTIES] = properties; deviceObject[constants.DEVICE_PROPERTIES] = properties;
deviceObject[constants.DEVICE_ENROLLMENT] = device.getDateOfEnrolment(); deviceObject[constants.DEVICE_ENROLLMENT] = device.getEnrolmentInfo().getDateOfEnrolment();
return deviceObject; return deviceObject;
} }
}; };

Loading…
Cancel
Save