mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-25 08:39:38 -05:00
12 lines
239 B
Ruby
12 lines
239 B
Ruby
module Jobs
|
|
class CloseTopic < Jobs::Base
|
|
|
|
def execute(args)
|
|
if topic = Topic.where(id: args[:topic_id]).first
|
|
closer = User.where(id: args[:user_id]).first
|
|
topic.auto_close(closer)
|
|
end
|
|
end
|
|
|
|
end
|
|
end
|