VerifiedAccount account = dataManager
.getVerifiedAccount(emailAddress);
// First, check if a policy of the selected type exists, If so, we
// update it
ReportingPolicy reportingPolicy = account.getReportingPolicy(type);
boolean modified = false;
if (notifyAfterMinutes != null && reportingPolicy.getNotifyAfterMinutes() != notifyAfterMinutes) {
reportingPolicy.setNotifyAfterMinutes(notifyAfterMinutes);
modified = true;
}
if (notifyIfNoOpenTests != null && reportingPolicy.isNotifyIfNoOpenTests() != notifyIfNoOpenTests) {
reportingPolicy.setNotifyIfNoOpenTests(notifyIfNoOpenTests);
modified = true;
}
if (modified) {
return Response.status(Status.OK).build();