Renamed modpol/modpol directory to modpol_core for clarity and consistency
This commit is contained in:
27
modpol_core/modules/remove_org.lua
Normal file
27
modpol_core/modules/remove_org.lua
Normal file
@ -0,0 +1,27 @@
|
||||
--- @module Remove Org
|
||||
-- A simple module that calls a consent process on an org to remove it.
|
||||
|
||||
|
||||
--- Main module table
|
||||
remove_org = {
|
||||
name = "Remove this org",
|
||||
slug = "remove_org",
|
||||
desc = "Removes an org if all members consent."
|
||||
}
|
||||
|
||||
remove_org.config = {}
|
||||
remove_org.data = {}
|
||||
|
||||
--- Initiate function
|
||||
-- @function initiate
|
||||
function remove_org:initiate(config, result)
|
||||
modpol.interactions.message_org(
|
||||
self.initiator,self.org.id,
|
||||
"Removing org: "..self.org.name)
|
||||
self.org:delete()
|
||||
modpol.interactions.dashboard(self.initiator)
|
||||
-- call result function
|
||||
if result then result() end
|
||||
end
|
||||
|
||||
modpol.modules.remove_org = remove_org
|
Reference in New Issue
Block a user