Making a topic content NOT mandatory
Moved
Solved
Technical Support
-
Can I make the
content
of a main post becomes NOT mandatory when creating a topic?
Currently I create a topic by using API with this json body:{ "cid": 5, "title": "Topic title", "content": "Topic content for main post", "tags": [ "Development" ] }
I want to remove the
content
field so the json body becomes like this:{ "cid": 5, "title": "Topic title", "tags": [ "Development" ]
I know I can set the post length to 0 in ACP, but I got this response when creating topic without the
content
field{ "status": { "code": "bad-request", "message": "Please enter a longer post. Posts should contain at least 0 character(s)." }, "response": {} }
Basically I want to make the
content
field optional. Any suggestion?Thanks in advance.
-
@nullpointer thanks for reporting https://github.com/NodeBB/NodeBB/issues/11331
-
-
@baris said in Making a topic content NOT mandatory:
Try with this change https://github.com/NodeBB/NodeBB/commit/8c762d3228ee622984a6eb4bad5cbec810c27e60 and let me know.
It works!
Thanks a lot @baris -
-
Copyright © 2024 NodeBB | Contributors