Chore: ng lint using the recommended @angular-eslint style
This commit is contained in:
@ -20,33 +20,27 @@ export class TaxService {
|
||||
|
||||
get(id: string | null): Observable<Tax> {
|
||||
const getUrl: string = id === null ? url : `${url}/${id}`;
|
||||
return <Observable<Tax>>(
|
||||
this.http.get<Tax>(getUrl).pipe(catchError(this.log.handleError(serviceName, `get id=${id}`)))
|
||||
);
|
||||
return this.http
|
||||
.get<Tax>(getUrl)
|
||||
.pipe(catchError(this.log.handleError(serviceName, `get id=${id}`))) as Observable<Tax>;
|
||||
}
|
||||
|
||||
list(): Observable<Tax[]> {
|
||||
return <Observable<Tax[]>>(
|
||||
this.http
|
||||
.get<Tax[]>(`${url}/list`)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'list')))
|
||||
);
|
||||
return this.http
|
||||
.get<Tax[]>(`${url}/list`)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'list'))) as Observable<Tax[]>;
|
||||
}
|
||||
|
||||
save(tax: Tax): Observable<Tax> {
|
||||
return <Observable<Tax>>(
|
||||
this.http
|
||||
.post<Tax>(url, tax, httpOptions)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'save')))
|
||||
);
|
||||
return this.http
|
||||
.post<Tax>(url, tax, httpOptions)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'save'))) as Observable<Tax>;
|
||||
}
|
||||
|
||||
update(tax: Tax): Observable<Tax> {
|
||||
return <Observable<Tax>>(
|
||||
this.http
|
||||
.put<Tax>(`${url}/${tax.id}`, tax, httpOptions)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'update')))
|
||||
);
|
||||
return this.http
|
||||
.put<Tax>(`${url}/${tax.id}`, tax, httpOptions)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'update'))) as Observable<Tax>;
|
||||
}
|
||||
|
||||
saveOrUpdate(tax: Tax): Observable<Tax> {
|
||||
@ -57,10 +51,8 @@ export class TaxService {
|
||||
}
|
||||
|
||||
delete(id: string): Observable<Tax> {
|
||||
return <Observable<Tax>>(
|
||||
this.http
|
||||
.delete<Tax>(`${url}/${id}`, httpOptions)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'delete')))
|
||||
);
|
||||
return this.http
|
||||
.delete<Tax>(`${url}/${id}`, httpOptions)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'delete'))) as Observable<Tax>;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user