Replace logo, fix #57 - delete/unreblog/unfavourite API, fix #45 - app

registration API
This commit is contained in:
Eugen Rochko
2016-09-26 23:55:21 +02:00
parent 210362e665
commit 7e14eefc81
27 changed files with 216 additions and 136 deletions

View File

@ -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

View File

@ -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

View File

@ -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