diff --git a/spring-rest2ts-spring/src/main/java/com/blueveery/springrest2ts/implgens/FetchBasedImplementationGenerator.java b/spring-rest2ts-spring/src/main/java/com/blueveery/springrest2ts/implgens/FetchBasedImplementationGenerator.java index 4ce855f..8e6c4be 100644 --- a/spring-rest2ts-spring/src/main/java/com/blueveery/springrest2ts/implgens/FetchBasedImplementationGenerator.java +++ b/spring-rest2ts-spring/src/main/java/com/blueveery/springrest2ts/implgens/FetchBasedImplementationGenerator.java @@ -159,15 +159,10 @@ public void changeMethodBeforeImplementationGeneration(TSMethod tsMethod) { @Override public TSType mapReturnType(TSMethod tsMethod, TSType tsType) { if (isRestClass(tsMethod.getOwner())) { - tsMethod.setAsync(useAsync); - if (useAsync) { - return tsType; - } else { - if (tsType == TypeMapper.tsVoid) { - return new TSInterfaceReference(promiseInterface, responseInterface); - } - return new TSInterfaceReference(promiseInterface, tsType); + if (tsType == TypeMapper.tsVoid) { + return new TSInterfaceReference(promiseInterface, responseInterface); } + return new TSInterfaceReference(promiseInterface, tsType); } return tsType; }