about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-03-21 17:02:16 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-03-21 17:02:16 +0100
commit9d55529318a285ced484b9216df9064914d6f790 (patch)
tree5e6ac6135236c44e5a75105c7af64652a27adce4 /app/controllers
parentbf08d46e58c423688d870cf128ded7fd36009115 (diff)
Fix text color in dashboard inputs, sanitize remote status content in UI,
simplify FanOutOnWriteService, add /api/accounts/lookup method
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/api/accounts/lookup_controller.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/controllers/api/accounts/lookup_controller.rb b/app/controllers/api/accounts/lookup_controller.rb
new file mode 100644
index 000000000..dc8bcb132
--- /dev/null
+++ b/app/controllers/api/accounts/lookup_controller.rb
@@ -0,0 +1,11 @@
+class Api::Accounts::LookupController < ApplicationController
+  def index
+    @accounts = Account.where(domain: nil).where(username: lookup_params)
+  end
+
+  private
+
+  def lookup_params
+    (params[:usernames] || '').split(',').map(&:strip)
+  end
+end