feat: add note length check on note creation

This check throws a MaximumDocumentLengthExceededError, if the configured maxDocumentLength is exceeded by the new note

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2022-10-02 23:26:50 +02:00
parent 35032eef09
commit 5275f6b876
7 changed files with 30 additions and 4 deletions

View file

@ -69,7 +69,7 @@ export class NotesController {
@Permissions(Permission.CREATE)
@Post()
@OpenApi(201, 403, 409)
@OpenApi(201, 403, 409, 413)
async createNote(
@RequestUser() user: User,
@MarkdownBody() text: string,
@ -112,6 +112,7 @@ export class NotesController {
400,
403,
409,
413,
)
async createNamedNote(
@RequestUser() user: User,