From 7e14eefc819ce27f45406452a4f8e2039d0f0886 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 26 Sep 2016 23:55:21 +0200 Subject: Replace logo, fix #57 - delete/unreblog/unfavourite API, fix #45 - app registration API --- app/controllers/api/apps_controller.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 app/controllers/api/apps_controller.rb (limited to 'app/controllers/api/apps_controller.rb') diff --git a/app/controllers/api/apps_controller.rb b/app/controllers/api/apps_controller.rb new file mode 100644 index 000000000..629cb2416 --- /dev/null +++ b/app/controllers/api/apps_controller.rb @@ -0,0 +1,13 @@ +class Api::AppsController < ApplicationController + respond_to :json + + def create + @app = Doorkeeper::Application.create!(app_params) + end + + private + + def app_params + params.permit(:name, :redirect_uri) + end +end -- cgit