Merge commit 'bf01ad8e00ea68c884f287b89b25393fe2ef8c7c' into wip-customer
* commit 'bf01ad8e00ea68c884f287b89b25393fe2ef8c7c':
changed return type in POST /customers/{id}/toaccounts endpoint
This commit is contained in:
@@ -5,11 +5,11 @@ import net.chrisrichardson.eventstore.javaexamples.banking.common.customers.Cust
|
|||||||
import net.chrisrichardson.eventstore.javaexamples.banking.common.customers.CustomerResponse;
|
import net.chrisrichardson.eventstore.javaexamples.banking.common.customers.CustomerResponse;
|
||||||
import net.chrisrichardson.eventstore.javaexamples.banking.common.customers.ToAccountInfo;
|
import net.chrisrichardson.eventstore.javaexamples.banking.common.customers.ToAccountInfo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.ResponseEntity;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import rx.Observable;
|
import rx.Observable;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by popikyardo on 03.02.16.
|
* Created by popikyardo on 03.02.16.
|
||||||
*/
|
*/
|
||||||
@@ -31,9 +31,9 @@ public class CustomerController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/{id}/toaccounts", method = RequestMethod.POST)
|
@RequestMapping(value = "/{id}/toaccounts", method = RequestMethod.POST)
|
||||||
public Observable<String> addToAccount(@PathVariable String id, @Validated @RequestBody ToAccountInfo request) {
|
public Observable<ToAccountInfo> addToAccount(@PathVariable String id, @Validated @RequestBody ToAccountInfo request) {
|
||||||
return customerService.addToAccount(id, request)
|
return customerService.addToAccount(id, request)
|
||||||
.map(entityAndEventInfo -> entityAndEventInfo.entityVersion().asString());
|
.map(entityAndEventInfo -> request);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user