0
0
Fork 0

Add a preferences API so apps can share basic behaviours (#10109)

This commit is contained in:
Eugen Rochko 2019-03-15 02:39:20 +01:00 committed by GitHub
parent 85c3bbb238
commit d94e21f933
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,12 @@
# frozen_string_literal: true
class Api::V1::PreferencesController < Api::BaseController
before_action -> { doorkeeper_authorize! :read, :'read:accounts' }
before_action :require_user!
respond_to :json
def index
render json: current_account, serializer: REST::PreferencesSerializer
end
end