Chore: ng lint using the recommended @angular-eslint style
This commit is contained in:
@ -20,34 +20,32 @@ export class SectionPrinterService {
|
||||
|
||||
get(id: string | null): Observable<SectionPrinter[]> {
|
||||
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
||||
return <Observable<SectionPrinter[]>>(
|
||||
this.http
|
||||
.get<SectionPrinter[]>(getUrl)
|
||||
.pipe(catchError(this.log.handleError(serviceName, `get id=${id}`)))
|
||||
);
|
||||
return this.http
|
||||
.get<SectionPrinter[]>(getUrl)
|
||||
.pipe(catchError(this.log.handleError(serviceName, `get id=${id}`))) as Observable<
|
||||
SectionPrinter[]
|
||||
>;
|
||||
}
|
||||
|
||||
// item(id: string, menuCategoryId: string): Observable<SectionPrinterItem> {
|
||||
// const options = {params: new HttpParams().set('m', menuCategoryId)};
|
||||
// return <Observable<SectionPrinterItem>>this.http.get<SectionPrinterItem>(`${url}/${id}`, options)
|
||||
// return this.http.get<SectionPrinterItem>(`${url}/${id}`, options)
|
||||
// .pipe(
|
||||
// catchError(this.log.handleError(serviceName, 'list'))
|
||||
// );
|
||||
// ) as Observable<SectionPrinterItem>;
|
||||
// }
|
||||
|
||||
save(sectionId: string, list: SectionPrinter[]): Observable<SectionPrinter[]> {
|
||||
return <Observable<SectionPrinter[]>>(
|
||||
this.http
|
||||
.post<SectionPrinter[]>(`${url}/${sectionId}`, list, httpOptions)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'save')))
|
||||
);
|
||||
return this.http
|
||||
.post<SectionPrinter[]>(`${url}/${sectionId}`, list, httpOptions)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'save'))) as Observable<SectionPrinter[]>;
|
||||
}
|
||||
|
||||
delete(id: string): Observable<SectionPrinter[]> {
|
||||
return <Observable<SectionPrinter[]>>(
|
||||
this.http
|
||||
.delete<SectionPrinter[]>(`${url}/${id}`, httpOptions)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'delete')))
|
||||
);
|
||||
return this.http
|
||||
.delete<SectionPrinter[]>(`${url}/${id}`, httpOptions)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'delete'))) as Observable<
|
||||
SectionPrinter[]
|
||||
>;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user