1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-12-29 06:58:51 +00:00

Can send comment images without content

This commit is contained in:
Pierre HUBERT 2020-03-21 11:29:56 +01:00
parent 4ffa8a421b
commit aa0c9f4f6a

View File

@ -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!");