Add a preferences API so apps can share basic behaviours (#10109)
This commit is contained in:
parent
85c3bbb238
commit
d94e21f933
3 changed files with 43 additions and 0 deletions
12
app/controllers/api/v1/preferences_controller.rb
Normal file
12
app/controllers/api/v1/preferences_controller.rb
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue