Minor refactor of CPS rest controller

Use streams to simplify logic

Issue-ID: CPS-2416
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I1c37ac9c2fa7543e94f8cd60447f4a879a7376f7
1 file changed