summaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
Diffstat (limited to 'users')
-rw-r--r--users/app/controllers/users_controller.rb6
-rw-r--r--users/app/views/users/get_public_key.html.haml2
-rw-r--r--users/config/routes.rb2
3 files changed, 10 insertions, 0 deletions
diff --git a/users/app/controllers/users_controller.rb b/users/app/controllers/users_controller.rb
index 3cbb6dc..3f4daeb 100644
--- a/users/app/controllers/users_controller.rb
+++ b/users/app/controllers/users_controller.rb
@@ -59,4 +59,10 @@ class UsersController < UsersBaseController
end
end
+ def get_public_key
+ @show_navigation = false
+ user = User.find_by_login(params[:login])
+ @public_key = user.public_key if user
+ end
+
end
diff --git a/users/app/views/users/get_public_key.html.haml b/users/app/views/users/get_public_key.html.haml
new file mode 100644
index 0000000..eccb367
--- /dev/null
+++ b/users/app/views/users/get_public_key.html.haml
@@ -0,0 +1,2 @@
+- if @public_key
+ = @public_key \ No newline at end of file
diff --git a/users/config/routes.rb b/users/config/routes.rb
index ccecfd5..1077561 100644
--- a/users/config/routes.rb
+++ b/users/config/routes.rb
@@ -22,4 +22,6 @@ Rails.application.routes.draw do
get "/.well-known/host-meta" => 'webfinger#host_meta'
get "/webfinger" => 'webfinger#search'
+ get "/key/:login" => 'users#get_public_key'
+
end