Chore: ng lint using the recommended @angular-eslint style
This commit is contained in:
@ -70,7 +70,9 @@ export class HeaderFooterComponent implements OnInit {
|
||||
getItem(): HeaderFooter {
|
||||
const formModel = this.form.value;
|
||||
const item = this.list.find((v) => v.id === this.id);
|
||||
if (item === undefined) return new HeaderFooter();
|
||||
if (item === undefined) {
|
||||
return new HeaderFooter();
|
||||
}
|
||||
item.text = formModel.text;
|
||||
return item;
|
||||
}
|
||||
|
||||
@ -20,16 +20,14 @@ export class HeaderFooterService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
|
||||
list(): Observable<HeaderFooter[]> {
|
||||
return <Observable<HeaderFooter[]>>(
|
||||
this.http.get<HeaderFooter[]>(url).pipe(catchError(this.log.handleError(serviceName, 'list')))
|
||||
);
|
||||
return this.http
|
||||
.get<HeaderFooter[]>(url)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'list'))) as Observable<HeaderFooter[]>;
|
||||
}
|
||||
|
||||
save(item: HeaderFooter): Observable<HeaderFooter[]> {
|
||||
return <Observable<HeaderFooter[]>>(
|
||||
this.http
|
||||
.post<HeaderFooter[]>(url, item, httpOptions)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'save')))
|
||||
);
|
||||
return this.http
|
||||
.post<HeaderFooter[]>(url, item, httpOptions)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'save'))) as Observable<HeaderFooter[]>;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user