From 9d55529318a285ced484b9216df9064914d6f790 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 21 Mar 2016 17:02:16 +0100 Subject: Fix text color in dashboard inputs, sanitize remote status content in UI, simplify FanOutOnWriteService, add /api/accounts/lookup method --- app/controllers/api/accounts/lookup_controller.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 app/controllers/api/accounts/lookup_controller.rb (limited to 'app/controllers') 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 -- cgit