fix
This commit is contained in:
parent
5fd457f230
commit
e90bdcedb2
|
@ -230,26 +230,21 @@ public class Notifications {
|
|||
username2Notify = um.getUserByUsername(userIdToNotify).getUsername();
|
||||
}
|
||||
catch (Exception e) {
|
||||
status = Status.NOT_ACCEPTABLE;
|
||||
status = Status.BAD_REQUEST;
|
||||
logger.error("Username not found", e);
|
||||
responseBean.setSuccess(false);
|
||||
responseBean.setMessage("Username not found " + userIdToNotify);
|
||||
responseBean.setMessage("Username not found, got: " + userIdToNotify);
|
||||
return Response.status(status).entity(responseBean).build();
|
||||
}
|
||||
if (username2Notify != null) {
|
||||
deliveryResult =
|
||||
|
||||
deliveryResult =
|
||||
nm.notifyCatalogueEvent(
|
||||
CatalogueEventTypeMapper.getType(event.getType()),
|
||||
username,
|
||||
username2Notify,
|
||||
event.getItemId(),
|
||||
event.getNotifyText(),
|
||||
event.getItemURL());
|
||||
} else {
|
||||
status = Status.NOT_ACCEPTABLE;
|
||||
responseBean.setSuccess(false);
|
||||
responseBean.setMessage("Username not found " + userIdToNotify);
|
||||
return Response.status(status).entity(responseBean).build();
|
||||
}
|
||||
|
||||
}
|
||||
} else { //the ids are contexts
|
||||
for (int i = 0; i < idsToNotify.length; i++) {
|
||||
|
|
Loading…
Reference in New Issue