option to truncate content on /documents endpoint

This commit is contained in:
Michael Shamoon
2022-11-20 00:06:00 -08:00
parent 88c15d32f1
commit 6d0d738b24
4 changed files with 19 additions and 2 deletions

View File

@@ -119,6 +119,9 @@ export class DocumentCardLargeComponent implements OnInit {
}
get contentTrimmed() {
return this.document.content.substr(0, 500)
return (
this.document.content.substr(0, 500) +
(this.document.content.length > 500 ? '...' : '')
)
}
}