mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-20 02:05:21 -04:00
feat(revision): include edits in dto
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
50c8f39c0c
commit
7050c9f13b
7 changed files with 48 additions and 6 deletions
|
@ -5,9 +5,10 @@
|
|||
*/
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { Type } from 'class-transformer';
|
||||
import { IsDate, IsNumber, IsString } from 'class-validator';
|
||||
import { IsDate, IsNumber, IsString, ValidateNested } from 'class-validator';
|
||||
|
||||
import { BaseDto } from '../utils/base.dto.';
|
||||
import { EditDto } from './edit.dto';
|
||||
import { Revision } from './revision.entity';
|
||||
|
||||
export class RevisionDto extends BaseDto {
|
||||
|
@ -42,4 +43,11 @@ export class RevisionDto extends BaseDto {
|
|||
@Type(() => Date)
|
||||
@ApiProperty()
|
||||
createdAt: Date;
|
||||
|
||||
/**
|
||||
* All edit objects which are used in the revision.
|
||||
*/
|
||||
@ValidateNested()
|
||||
@ApiProperty()
|
||||
edits: EditDto[];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue