Skip to content

Commit 21319f9

Browse files
committed
case insensitive notifacation query param
1 parent 32329c5 commit 21319f9

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/edu/tamu/app/controller/NotificationController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public ApiResponse remove(@ApiValidatedModel Notification notification) {
6868
@SkipAop
6969
@RequestMapping("/notification/active")
7070
public String getActiveNotifications(@RequestParam(value = "location", defaultValue = "ALL") String location) {
71-
return buildNotificationHtml(notificationRepo.activeNotificationsByLocation(location));
71+
return buildNotificationHtml(notificationRepo.activeNotificationsByLocation(location.toLowerCase()));
7272
}
7373

7474
private String buildNotificationHtml(List<Notification> notifications) {

src/main/java/edu/tamu/app/model/validation/NotificationValidator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public NotificationValidator() {
1414
String bodyProperty = "body";
1515
this.addInputValidator(new InputValidator(InputValidationType.required, "Notifications require a body", bodyProperty, true));
1616
this.addInputValidator(new InputValidator(InputValidationType.minlength, "Notification body must be at least 3 characters", bodyProperty, 3));
17-
this.addInputValidator(new InputValidator(InputValidationType.maxlength, "Notifications must be no more than 140 cahracters", bodyProperty, 140));
17+
this.addInputValidator(new InputValidator(InputValidationType.maxlength, "Notifications must be no more than 5000 cahracters", bodyProperty, 5000));
1818

1919
String locationsProperty = "locations";
2020
this.addInputValidator(new InputValidator(InputValidationType.required, "Notifications must have a display location", locationsProperty, true));

0 commit comments

Comments
 (0)