mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-04 00:48:51 -04:00
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:
parent
35032eef09
commit
5275f6b876
7 changed files with 30 additions and 4 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue