Skip to content
Permalink
Browse files

Revert "API Fix: open threads must be public"

This reverts commit 3db5a20.
  • Loading branch information
nikolai-b committed Mar 24, 2020
1 parent 1f5e455 commit e470b1eddc6ef44b6a6b8cb957debfbb050ddb5e
Showing with 1 addition and 2 deletions.
  1. +1 −1 app/api/route/issue_api.rb
  2. +0 −1 spec/api/route/issue_api_spec.rb
@@ -85,7 +85,7 @@ def post_or_get_issue
scope = scope.before_date(params[:end_date]) if params[:end_date]
scope = scope.after_date(params[:start_date]) if params[:start_date]
scope = scope.pg_fulltext_search(params[:term]) if params[:term]
scope = scope.joins(:threads).merge(MessageThread.is_open.is_public).distinct if params[:open_threads]
scope = scope.joins(:threads).merge(MessageThread.is_open).distinct if params[:open_threads]
scope = paginate scope
issues = scope.map { |issue| issue_feature(issue) }
collection = RGeo::GeoJSON::EntityFactory.new.feature_collection(issues)
@@ -67,7 +67,6 @@
before do
create :issue
create :message_thread, :belongs_to_issue, closed: true
create :message_thread, :belongs_to_issue, :belongs_to_group, closed: false, privacy: "group"
create :message_thread, issue: open_threads
get "/api/issues", open_threads: true
end

0 comments on commit e470b1e

Please sign in to comment.
You can’t perform that action at this time.