about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/application.rb6
-rw-r--r--config/initializers/doorkeeper.rb2
-rw-r--r--config/routes.rb13
3 files changed, 8 insertions, 13 deletions
diff --git a/config/application.rb b/config/application.rb
index 81205de32..f6a5f6f9e 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -27,12 +27,6 @@ module Mastodon
 
     config.active_job.queue_adapter = :sidekiq
 
-    config.to_prepare do
-      # Doorkeeper::ApplicationsController.layout           'dashboard'
-      # Doorkeeper::AuthorizedApplicationsController.layout 'dashboard'
-      Doorkeeper::AuthorizationsController.layout         'auth'
-    end
-
     config.middleware.use Rack::Attack
     config.middleware.use Rack::Deflater
 
diff --git a/config/initializers/doorkeeper.rb b/config/initializers/doorkeeper.rb
index 0d6574d9f..2c02d2b54 100644
--- a/config/initializers/doorkeeper.rb
+++ b/config/initializers/doorkeeper.rb
@@ -45,7 +45,7 @@ Doorkeeper.configure do
   # Optional parameter :confirmation => true (default false) if you want to enforce ownership of
   # a registered application
   # Note: you must also run the rails g doorkeeper:application_owner generator to provide the necessary support
-  enable_application_owner :confirmation => true
+  # enable_application_owner :confirmation => true
 
   # Define access token scopes for your provider
   # For more information go to
diff --git a/config/routes.rb b/config/routes.rb
index 51f1f86da..737dbbecf 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -7,9 +7,7 @@ Rails.application.routes.draw do
     mount Sidekiq::Web => '/sidekiq'
   end
 
-  use_doorkeeper do
-    controllers applications: 'oauth/applications'
-  end
+  use_doorkeeper
 
   get '.well-known/host-meta', to: 'xrd#host_meta', as: :host_meta
   get '.well-known/webfinger', to: 'xrd#webfinger', as: :webfinger
@@ -31,7 +29,7 @@ Rails.application.routes.draw do
 
   resource  :settings, only: [:show, :update]
   resources :media, only: [:show]
-
+  
   namespace :api do
     # PubSubHubbub
     resources :subscriptions, only: [:show]
@@ -41,7 +39,7 @@ Rails.application.routes.draw do
     post '/salmon/:id', to: 'salmon#update', as: :salmon
 
     # JSON / REST API
-    resources :statuses, only: [:create, :show] do
+    resources :statuses, only: [:create, :show, :destroy] do
       collection do
         get :home
         get :mentions
@@ -51,13 +49,16 @@ Rails.application.routes.draw do
         get :context
 
         post :reblog
+        post :unreblog
         post :favourite
+        post :unfavourite
       end
     end
 
     resources :follows,  only: [:create]
     resources :media,    only: [:create]
-
+    resources :apps,     only: [:create]
+    
     resources :accounts, only: [:show] do
       collection do
         get :relationships