Refactor comment UI code

And run prettier
This commit is contained in:
Michael Shamoon
2022-08-07 17:33:13 -07:00
parent 6d956ac13b
commit 5c1e09cc48
7 changed files with 85 additions and 75 deletions

View File

@@ -7,14 +7,14 @@ import { Observable } from 'rxjs'
@Injectable({
providedIn: 'root',
})
export class DocumentCommentService extends AbstractPaperlessService<PaperlessDocumentComment> {
export class DocumentCommentsService extends AbstractPaperlessService<PaperlessDocumentComment> {
constructor(http: HttpClient) {
super(http, 'documents')
}
getComments(id: number): Observable<PaperlessDocumentComment[]> {
getComments(documentId: number): Observable<PaperlessDocumentComment[]> {
return this.http.get<PaperlessDocumentComment[]>(
this.getResourceUrl(id, 'comments')
this.getResourceUrl(documentId, 'comments')
)
}