changed return type in POST /customers/{id}/toaccounts endpoint

This commit is contained in:
dartpopikyardo
2016-03-23 00:57:09 +03:00
parent bf01ad8e00
commit a369c4989f

View File

@@ -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<ToAccountInfo> addToAccount(@PathVariable String id, @Validated @RequestBody ToAccountInfo request) {
public Observable<String> addToAccount(@PathVariable String id, @Validated @RequestBody ToAccountInfo request) {
return customerService.addToAccount(id, request)
.map(entityAndEventInfo -> request);
.map(entityAndEventInfo -> "\"" + entityAndEventInfo.entityVersion().asString() + "\"");
}
}