diff options
author | Azul <azul@leap.se> | 2013-01-22 12:02:18 +0100 |
---|---|---|
committer | Azul <azul@leap.se> | 2013-01-22 13:06:37 +0100 |
commit | de48efcf2a6b5fb096fd209b1efea482f743c19c (patch) | |
tree | c555b53719f67fd48bd6b742ff2f5e2ede7b7c53 /users/app/controllers | |
parent | ed1caa740f0e58cfd5f2d908946461154db68174 (diff) |
some basic webfinger routes, controller, presenters, views
Diffstat (limited to 'users/app/controllers')
-rw-r--r-- | users/app/controllers/webfinger_controller.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/users/app/controllers/webfinger_controller.rb b/users/app/controllers/webfinger_controller.rb new file mode 100644 index 0000000..e86cd2d --- /dev/null +++ b/users/app/controllers/webfinger_controller.rb @@ -0,0 +1,15 @@ +class WebfingerController < ApplicationController + + layout false + + def host_meta + @host_meta = Webfinger::HostMetaPresenter.new(request) + end + + def search + username = params[:q].split('@')[0].to_s.downcase + + user = User.find_by_login(username) + @subject = Webfinger::UserPresenter.new(user, request) + end +end |