What is the best way to write to the notes field of a flag? I am writing a plugin that when a post/user is flagged it will send the information to a ticketing system and return a ticket id. I want to write that ID to the flag and close the flag.
NodeBB libraries not accessible in plugin?
I'm trying to follow the basic tutorial on writing nodebb plugins.
But I'm using
module.parent.require('./database')in my plugin but it isn't working.
It simply says:
Error: Cannot find module './database'
Can anyone point me to the issue?
I'd suggest using
@pitaj Thanks! That worked!
Do you think the docs should be updated to include that?
module.parent.requirealso works fine. It depends whether you are calling it from a dependent file, or from the main plugin library file.