discourse/plugins/poll/jobs/regular/close_poll.rb

12 lines
175 B
Ruby

module Jobs
class ClosePoll < Jobs::Base
def execute(args)
DiscoursePoll::Poll.toggle_status(args[:post_id], args[:poll_name], "closed", -1)
end
end
end