Fix Case list was appending / at the end as the value was not null it was an empty string.
This commit is contained in:
@ -13,6 +13,6 @@ export class CaseListResolver implements Resolve<Case[]> {
|
||||
constructor(private ser: CaseService) {}
|
||||
|
||||
resolve(): Observable<Case[]> {
|
||||
return this.ser.list(null);
|
||||
return this.ser.list('');
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,8 +25,8 @@ export class CaseService {
|
||||
.pipe(catchError(this.log.handleError(serviceName, `get id=${id}`))) as Observable<Case>;
|
||||
}
|
||||
|
||||
list(caseSource: string | null): Observable<Case[]> {
|
||||
const listUrl: string = caseSource === null ? `${url}/list` : `${url}/list/${caseSource}`;
|
||||
list(caseSource: string): Observable<Case[]> {
|
||||
const listUrl: string = caseSource === '' ? `${url}/list` : `${url}/list/${caseSource}`;
|
||||
return this.http
|
||||
.get<Case[]>(listUrl)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'list'))) as Observable<Case[]>;
|
||||
|
||||
Reference in New Issue
Block a user