From a369c4989f8a238470e6ee7bd1a063f2937da1fc Mon Sep 17 00:00:00 2001 From: dartpopikyardo Date: Wed, 23 Mar 2016 00:57:09 +0300 Subject: [PATCH] changed return type in POST /customers/{id}/toaccounts endpoint --- .../web/commandside/customers/CustomerController.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/java-spring/customers-command-side-web/src/main/java/net/chrisrichardson/eventstore/javaexamples/banking/web/commandside/customers/CustomerController.java b/java-spring/customers-command-side-web/src/main/java/net/chrisrichardson/eventstore/javaexamples/banking/web/commandside/customers/CustomerController.java index 960f3a8..3c5383f 100644 --- a/java-spring/customers-command-side-web/src/main/java/net/chrisrichardson/eventstore/javaexamples/banking/web/commandside/customers/CustomerController.java +++ b/java-spring/customers-command-side-web/src/main/java/net/chrisrichardson/eventstore/javaexamples/banking/web/commandside/customers/CustomerController.java @@ -9,7 +9,6 @@ import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import rx.Observable; - /** * Created by popikyardo on 03.02.16. */ @@ -31,9 +30,9 @@ public class CustomerController { } @RequestMapping(value = "/{id}/toaccounts", method = RequestMethod.POST) - public Observable addToAccount(@PathVariable String id, @Validated @RequestBody ToAccountInfo request) { + public Observable addToAccount(@PathVariable String id, @Validated @RequestBody ToAccountInfo request) { return customerService.addToAccount(id, request) - .map(entityAndEventInfo -> request); + .map(entityAndEventInfo -> "\"" + entityAndEventInfo.entityVersion().asString() + "\""); } }