Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add filtering support to the server

  • Loading branch information...
commit 269cb4687df10836ccc364f1658a34de4ad11a66 1 parent 81946ca
@rixth rixth authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/soulmate/server.rb
View
3  lib/soulmate/server.rb
@@ -24,7 +24,8 @@ class Server < Sinatra::Base
results = {}
types.each do |type|
matcher = Matcher.new(type)
- results[type] = matcher.matches_for_term(term, :limit => limit)
+ filters = params[:filters] && params[:filters][type] ? params[:filters][type] : {}
+ results[type] = matcher.matches_for_term(term, :limit => limit, :filters => filters)
end
JSON.pretty_generate({
Please sign in to comment.
Something went wrong with that request. Please try again.