Simplier way of doing generic calls with call_module
This commit is contained in:
parent
0ec287fa57
commit
78ea89559f
@ -93,9 +93,9 @@ end
|
||||
-- @param policy (string) policy slug
|
||||
-- @param input (string) input content
|
||||
function change_policy:approve_change(module_slug, policy, input)
|
||||
self.org:approve(
|
||||
self.org:call_module(
|
||||
approval_module,
|
||||
self,
|
||||
self.initiator,
|
||||
{prompt = "Update " .. policy .. " policy on module " ..
|
||||
module_slug .. " with: " .. input .. " ?"},
|
||||
function()
|
||||
@ -108,7 +108,8 @@ function change_policy:approve_change(module_slug, policy, input)
|
||||
self.initiator, self.org.id)
|
||||
if self.data.result then self.data.result() end
|
||||
self.org:delete_process(self.id)
|
||||
end
|
||||
end,
|
||||
self.id
|
||||
)
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user