mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Improve compatibility (#7214)
* refactor content * refactor core * refactor rest * fix lint * fix * lint * lint * fix * fix * fix
This commit is contained in:
@@ -28,11 +28,14 @@ import { CommentEntry, CommentsApi } from '@alfresco/js-api';
|
||||
})
|
||||
export class CommentContentService {
|
||||
|
||||
private commentsApi: CommentsApi;
|
||||
_commentsApi: CommentsApi;
|
||||
get commentsApi(): CommentsApi {
|
||||
this._commentsApi = this._commentsApi ?? new CommentsApi(this.apiService.getInstance());
|
||||
return this._commentsApi;
|
||||
}
|
||||
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
private logService: LogService) {
|
||||
this.commentsApi = new CommentsApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -42,7 +45,7 @@ export class CommentContentService {
|
||||
* @returns Details of the comment added
|
||||
*/
|
||||
addNodeComment(nodeId: string, message: string): Observable<CommentModel> {
|
||||
return from(this.commentsApi.createComment(nodeId, {content: message}))
|
||||
return from(this.commentsApi.createComment(nodeId, { content: message }))
|
||||
.pipe(
|
||||
map((response: CommentEntry) => {
|
||||
return new CommentModel({
|
||||
|
Reference in New Issue
Block a user