Update delete device with a print message

pull/140/head
Akeela Azhar 1 year ago
parent 43cd189b48
commit cd5aba0c5d

@ -156,7 +156,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
String range = "Sheet1!A:D";
// Prepare the values to be written
List<Object> rowValues = Arrays.asList(startTime, endTime, responseTime);
List<Object> rowValues = Arrays.asList(startTime, endTime, responseTime, message);
List<List<Object>> values = Collections.singletonList(rowValues);
// Build the value range object
@ -482,11 +482,12 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
return Response.status(Response.Status.NOT_FOUND).build();
}
boolean response = deviceManagementProviderService.disenrollDevice(deviceIdentifier);
String message = "Delete Device";
long endTime = System.currentTimeMillis(); //end measuring API call response time
long responseTime = endTime - startTime;
// save the start time, end time and response time to google sheet
saveResponseTimeToSpreadsheet(startTime, endTime, responseTime, "Delete Device");
saveResponseTimeToSpreadsheet(startTime, endTime, responseTime, message);
return Response.status(Response.Status.OK).entity(response).build();
} catch (DeviceManagementException e) {
String msg = "Error encountered while deleting requested device of type : " + deviceType;

Loading…
Cancel
Save