returning valid commandId for api actions when maker checker is enabled

This commit is contained in:
ashok-conflux
2013-12-17 13:35:34 +05:30
parent a354b3e664
commit 14a7e6a067
@@ -93,10 +93,10 @@ public class SynchronousCommandProcessingService implements CommandProcessingSer
@Transactional @Transactional
@Override @Override
public CommandProcessingResult logCommand(final CommandSource commandSourceResult) { public CommandProcessingResult logCommand(CommandSource commandSourceResult) {
commandSourceResult.markAsAwaitingApproval(); commandSourceResult.markAsAwaitingApproval();
this.commandSourceRepository.save(commandSourceResult); commandSourceResult = this.commandSourceRepository.save(commandSourceResult);
return new CommandProcessingResultBuilder().withCommandId(commandSourceResult.getId()) return new CommandProcessingResultBuilder().withCommandId(commandSourceResult.getId())
.withEntityId(commandSourceResult.getResourceId()).build(); .withEntityId(commandSourceResult.getResourceId()).build();