Skip to content

Commit 375b9a0

Browse files
Stefan SchubertStefan Schubert
authored andcommitted
fix coding
1 parent f6d2643 commit 375b9a0

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/mustache/api.service.mustache

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ import { CustomQueryEncoderHelper } from '../encoder';
2121
{{^useRxJS6}}
2222
import { Observable } from 'rxjs/Observable';
2323
import { Subject } from 'rxjs/Subject';
24+
import { Subscription } from 'rxjs/Subscription';
2425
{{/useRxJS6}}
2526
{{#useRxJS6}}
26-
import { Observable, Subject } from 'rxjs';
27+
import { Observable, Subject, Subscription } from 'rxjs';
2728
import { catchError, takeUntil, tap, share } from 'rxjs/operators';
2829
{{/useRxJS6}}
2930
{{^useHttpClient}}
@@ -351,7 +352,7 @@ export class {{classname}} {
351352
this.configuration.beforeHandler('{{operationIdOriginal}}', '{{httpMethod}}'.toUpperCase());
352353
}
353354
let afterSubscription: Subscription;
354-
const afterHandler = (result: any) => {
355+
const afterHandler = (result: any = null) => {
355356
if (afterSubscription) {
356357
afterSubscription.unsubscribe();
357358
}
@@ -373,7 +374,7 @@ export class {{classname}} {
373374
result => afterHandler(result),
374375
err => afterHandler(err),
375376
() => afterHandler()
376-
)
377+
);
377378

378379
if (typeof this.configuration.errorHandler === 'function') {
379380
return handle.pipe(catchError(err => this.configuration.errorHandler(err, '{{operationIdOriginal}}')));
@@ -421,7 +422,7 @@ export class {{classname}} {
421422
this.configuration.beforeHandler('{{operationIdOriginal}}', '{{httpMethod}}'.toUpperCase());
422423
}
423424
let afterSubscription: Subscription;
424-
const afterHandler = (result: any) => {
425+
const afterHandler = (result: any = null) => {
425426
if (afterSubscription) {
426427
afterSubscription.unsubscribe();
427428
}
@@ -443,7 +444,7 @@ export class {{classname}} {
443444
result => afterHandler(result),
444445
err => afterHandler(err),
445446
() => afterHandler()
446-
)
447+
);
447448

448449
if (typeof this.configuration.errorHandler === 'function') {
449450
return handle.catch(err => this.configuration.errorHandler(err, '{{operationIdOriginal}}'));

0 commit comments

Comments
 (0)