Refactor /api/web APIs to use the centralized axios instance (#6223)

Also adds the ability to decouple the centralized axios logic from the
state dispatcher
This commit is contained in:
nightpool authored and Eugen Rochko committed 2018-01-08 20:01:33 +01:00
1 parent ff6ca8bdc6
commit c235711ffe
5 files changed
+21 -13

No files matched your search

+1 -1
View File
@@ -6,8 +6,8 @@ class Api::BaseController < ApplicationController
include RateLimitHeaders
skip_before_action :verify_authenticity_token
skip_before_action :store_current_location
protect_from_forgery with: :null_session
rescue_from ActiveRecord::RecordInvalid, Mastodon::ValidationError do |e|
render json: { error: e.to_s }, status: 422