mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 11:16:31 -05:00
feat(revision): include length in dto
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
7050c9f13b
commit
3ea42fb048
2 changed files with 9 additions and 0 deletions
|
@ -28,6 +28,14 @@ export class RevisionDto extends BaseDto {
|
|||
@ApiProperty()
|
||||
content: string;
|
||||
|
||||
/**
|
||||
* Number of characters in this revision
|
||||
* @example 142
|
||||
*/
|
||||
@IsNumber()
|
||||
@ApiProperty()
|
||||
length: number;
|
||||
|
||||
/**
|
||||
* Patch from the preceding revision to this one
|
||||
*/
|
||||
|
|
|
@ -115,6 +115,7 @@ export class RevisionsService {
|
|||
return {
|
||||
id: revision.id,
|
||||
content: revision.content,
|
||||
length: revision.length,
|
||||
createdAt: revision.createdAt,
|
||||
patch: revision.patch,
|
||||
edits: await Promise.all(
|
||||
|
|
Loading…
Reference in a new issue