mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-29 05:54: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()
|
@ApiProperty()
|
||||||
content: string;
|
content: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Number of characters in this revision
|
||||||
|
* @example 142
|
||||||
|
*/
|
||||||
|
@IsNumber()
|
||||||
|
@ApiProperty()
|
||||||
|
length: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Patch from the preceding revision to this one
|
* Patch from the preceding revision to this one
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -115,6 +115,7 @@ export class RevisionsService {
|
||||||
return {
|
return {
|
||||||
id: revision.id,
|
id: revision.id,
|
||||||
content: revision.content,
|
content: revision.content,
|
||||||
|
length: revision.length,
|
||||||
createdAt: revision.createdAt,
|
createdAt: revision.createdAt,
|
||||||
patch: revision.patch,
|
patch: revision.patch,
|
||||||
edits: await Promise.all(
|
edits: await Promise.all(
|
||||||
|
|
Loading…
Reference in a new issue