From 1b1e2324760a064a310e59c65c219ebd1051f3c5 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Mon, 31 May 2021 22:02:32 +0200 Subject: [PATCH] Rename NoteAuthorshipDto to EditDto After Authorship was renamed to Edit, the DTO should follow. The file is also moved to the revisions folder, where the entity already is. Signed-off-by: David Mehren --- src/notes/note.dto.ts | 6 +++--- src/{notes/note-authorship.dto.ts => revisions/edit.dto.ts} | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) rename src/{notes/note-authorship.dto.ts => revisions/edit.dto.ts} (97%) diff --git a/src/notes/note.dto.ts b/src/notes/note.dto.ts index e61fa32bc..10dcf4e88 100644 --- a/src/notes/note.dto.ts +++ b/src/notes/note.dto.ts @@ -5,7 +5,7 @@ */ import { IsArray, IsString, ValidateNested } from 'class-validator'; -import { NoteAuthorshipDto } from './note-authorship.dto'; +import { EditDto } from '../revisions/edit.dto'; import { NoteMetadataDto } from './note-metadata.dto'; import { ApiProperty } from '@nestjs/swagger'; @@ -30,6 +30,6 @@ export class NoteDto { */ @IsArray() @ValidateNested({ each: true }) - @ApiProperty({ isArray: true, type: NoteAuthorshipDto }) - editedByAtPosition: NoteAuthorshipDto[]; + @ApiProperty({ isArray: true, type: EditDto }) + editedByAtPosition: EditDto[]; } diff --git a/src/notes/note-authorship.dto.ts b/src/revisions/edit.dto.ts similarity index 97% rename from src/notes/note-authorship.dto.ts rename to src/revisions/edit.dto.ts index 16acac592..175ae9787 100644 --- a/src/notes/note-authorship.dto.ts +++ b/src/revisions/edit.dto.ts @@ -8,7 +8,7 @@ import { IsDate, IsNumber, IsString, Min } from 'class-validator'; import { UserInfoDto } from '../users/user-info.dto'; import { ApiProperty } from '@nestjs/swagger'; -export class NoteAuthorshipDto { +export class EditDto { /** * Username of the user who authored this section * @example "john.smith"