mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
@@ -17,7 +17,7 @@
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable, from, throwError } from 'rxjs';
|
||||
import { AlfrescoApiService } from '../../../../core/services';
|
||||
import { AlfrescoApiService, LogService } from '@alfresco/adf-core';
|
||||
import { AuditApi, AuditAppPaging, AuditAppEntry, AuditApp, AuditBodyUpdate, AuditEntryPaging, AuditEntryEntry } from '@alfresco/js-api';
|
||||
import { catchError } from 'rxjs/operators';
|
||||
|
||||
@@ -28,8 +28,7 @@ export class AuditService {
|
||||
|
||||
auditApi: AuditApi;
|
||||
|
||||
constructor(
|
||||
private apiService: AlfrescoApiService) {
|
||||
constructor(private apiService: AlfrescoApiService, private logService: LogService) {
|
||||
this.auditApi = new AuditApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
@@ -111,7 +110,7 @@ export class AuditService {
|
||||
}
|
||||
|
||||
private handleError(error: any): any {
|
||||
console.error(error);
|
||||
this.logService.error(error);
|
||||
return throwError(error || 'Server error');
|
||||
}
|
||||
}
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { AlfrescoApiService } from '@alfresco/adf-core';
|
||||
import { AlfrescoApiService, LogService } from '@alfresco/adf-core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { RatingEntry, RatingBody } from '@alfresco/js-api';
|
||||
import { from, throwError, Observable } from 'rxjs';
|
||||
@@ -26,7 +26,7 @@ import { catchError } from 'rxjs/operators';
|
||||
})
|
||||
export class RatingService {
|
||||
|
||||
constructor(private apiService: AlfrescoApiService) {
|
||||
constructor(private apiService: AlfrescoApiService, private logService: LogService) {
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -74,7 +74,7 @@ export class RatingService {
|
||||
}
|
||||
|
||||
private handleError(error: any): any {
|
||||
console.error(error);
|
||||
this.logService.error(error);
|
||||
return throwError(error || 'Server error');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user