|
|
@ -31,7 +31,7 @@ public class MessagesController { |
|
|
|
@RequestParam(required = false, defaultValue = "0") Integer offset, |
|
|
|
@RequestParam(required = false, defaultValue = "20") Integer limit) { |
|
|
|
if (limit > 20) return new ResponseEntity(HttpStatus.NOT_ACCEPTABLE); |
|
|
|
return new ResponseEntity(messageService.getAllMessages(srv, filter, offset, limit), HttpStatus.OK); |
|
|
|
return new ResponseEntity(messageService.getAllMessages(srv, filter==null||filter.isEmpty()?null:filter, offset, limit), HttpStatus.OK); |
|
|
|
} |
|
|
|
|
|
|
|
@PostMapping("/account") |
|
|
@ -47,6 +47,6 @@ public class MessagesController { |
|
|
|
SteamID steamID = steam64 == null || steam64.isEmpty() ? SteamIDConverter.getSteamID(mysteam64) : SteamIDConverter.getSteamID(steam64); |
|
|
|
if (steamID == null) return new ResponseEntity(HttpStatus.NOT_FOUND); |
|
|
|
if (limit > 20) return new ResponseEntity(HttpStatus.NOT_ACCEPTABLE); |
|
|
|
return new ResponseEntity(messageService.getAccountMessages(steamID, srv, filter, offset, limit), HttpStatus.OK); |
|
|
|
return new ResponseEntity(messageService.getAccountMessages(steamID, srv, filter==null||filter.isEmpty()?null:filter, offset, limit), HttpStatus.OK); |
|
|
|
} |
|
|
|
} |
|
|
|