/forum_topics.json: add search[id]=<ids> param.

This commit is contained in:
evazion
2017-05-10 16:58:40 -05:00
parent f510a0d9d2
commit 8988f9cde8

View File

@@ -72,6 +72,10 @@ class ForumTopic < ActiveRecord::Base
q = permitted
return q if params.blank?
if params[:id].present?
q = q.where(id: params[:id].split(",").map(&:to_i))
end
if params[:mod_only].present?
q = q.where("min_level >= ?", MIN_LEVELS[:Moderator])
end