Project

General

Profile

« Previous | Next » 

Revision 60527

Get notifications
return 404 if not found
403 if no manager or curator

View differences:

modules/uoa-claims-api/trunk/src/main/java/eu/dnetlib/openaire/rest/ClaimsService.java
879 879
                            notification.setOpenaireName(communityInfo.getName());
880 880
                            notifications.add(notification);
881 881
                        }
882
                    }else{
883
                        return Response.status(Response.Status.FORBIDDEN).entity(compose403Message("Forbidden: You don't have permission to access. You are not registered."))
884
                                .type(MediaType.APPLICATION_JSON)
885
                                .build();
882 886
                    }
883 887
                } else {
884 888
                    Map<String, String> projectIdsAndNames = fetchProjectHandler.fetchProjectIdsAndNamesByProjectManagerMail(userMail);
......
911 915
            }
912 916

  
913 917
            if (notifications == null || notifications.isEmpty()) {
914
                return Response.status(204).entity(compose204Message("There are no notifications for user with mail " + userMail)).type(MediaType.APPLICATION_JSON).build();
918
                return Response.status(Response.Status.NOT_FOUND).entity(compose404Message("There are no notifications for user with mail " + userMail)).type(MediaType.APPLICATION_JSON).build();
915 919
            }
916 920

  
917 921
            return Response.status(200).entity(composeDataResponse(notifications)).build();

Also available in: Unified diff