Nope. You would need to make a plugin. There's no way to add any additional data to the post without writing your own functions to handle the submit action.
Script to remove post from database
-
Hi,
Since nodebb does not remove post from the database (only marking it as deleted), I have created this script to remove the post
from the database (redis only).Put it in the same location as config.json, modify as needed, and run with:
$ node remove_post.js.
-
Why not create a plugin out of it, using NodeBB's database functions so that it works across all databases?
-
I just want a quick solution.
If you look at the code, I already use the db methods, but the db doesn't provide method to iterate the keys so I have to call redis client directly.
-
@char101 Yeah, we don't expose the
KEYS
redis command because it is very inefficientO(N)
where N is the # of keys in the database -
Check out this commit https://github.com/NodeBB/NodeBB/commit/a65d61290742fef5ed76834a73e069336ebe5b6b and this file https://github.com/NodeBB/NodeBB/blob/master/src/posts/delete.js.
-
@baris Thanks, now that it's a builtin function, it's even better.
How about notifications that refers to the deleted topic, is these not required to be deleted?