77import static edu .tamu .framework .enums .BusinessValidationType .NONEXISTS ;
88import static edu .tamu .framework .enums .BusinessValidationType .UPDATE ;
99
10- import java .util .ArrayList ;
1110import java .util .List ;
1211
13- import org .apache .tools .ant .taskdefs .condition .Not ;
1412import org .springframework .beans .factory .annotation .Autowired ;
13+ import org .springframework .web .bind .annotation .RequestMapping ;
1514import org .springframework .web .bind .annotation .RequestParam ;
1615import org .springframework .web .bind .annotation .RestController ;
1716
2322import edu .tamu .framework .aspect .annotation .ApiValidation ;
2423import edu .tamu .framework .aspect .annotation .ApiVariable ;
2524import edu .tamu .framework .aspect .annotation .Auth ;
25+ import edu .tamu .framework .aspect .annotation .SkipAop ;
2626import edu .tamu .framework .model .ApiResponse ;
2727
2828@ RestController
@@ -68,9 +68,9 @@ public ApiResponse remove(@ApiValidatedModel Notification notification) {
6868 return new ApiResponse (SUCCESS );
6969 }
7070
71- @ ApiMapping ( "/active" )
72- @ Auth ( role = "ROLE_ANONYMOUS " )
73- public ApiResponse getActiveNotifications (@ RequestParam (value = "location" , defaultValue = "ALL" ) String locationString ) {
71+ @ SkipAop
72+ @ RequestMapping ( "/notification/active " )
73+ public String getActiveNotifications (@ RequestParam (value = "location" , defaultValue = "ALL" ) String locationString ) {
7474 String notificationString = "" ;
7575 List <Notification > notificationList ;
7676 if (locationString .equals ("ALL" )) {
@@ -83,7 +83,7 @@ public ApiResponse getActiveNotifications(@RequestParam(value = "location", defa
8383 notificationString += "<p>" + notification .getBody () + "</p>" ;
8484 }
8585
86- return new ApiResponse ( SUCCESS , "" , notificationString ) ;
86+ return notificationString ;
8787 }
8888
8989}
0 commit comments