From aa0c9f4f6a9761f4e33804eacd3c1d0ec582f7d4 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 21 Mar 2020 11:29:56 +0100 Subject: [PATCH] Can send comment images without content --- src/controllers/CommentsController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/CommentsController.ts b/src/controllers/CommentsController.ts index a80379c..7cd6890 100644 --- a/src/controllers/CommentsController.ts +++ b/src/controllers/CommentsController.ts @@ -58,7 +58,7 @@ export class CommentsController { * @param need_check True if the comment must have valid content / false else */ private static GetCommentContent(h: RequestHandler, name: string, need_check = true) : string { - const content = h.postContent(name); + const content = h.postContent(name, need_check ? 3 : 0); if(need_check && !check_string_before_insert(content)) h.error(400, "Please check new comment content!");