docbrown/app/controllers/api/v0/admin/configs_controller.rb
Ben Halpern 54937fa5a7
Add configs/show api for admins (#11358)
* Add configs/show api for admins

* Add initial test

* Add test

* Update docs/api_v0.yml

Co-authored-by: rhymes <rhymes@hey.com>

* Change to single resource

* Change authentication approach

* Change to status code spec

* Fix spec path

* Final touches

* Update spec/requests/api/v0/admin/configs_spec.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Proper stubbing

Co-authored-by: rhymes <rhymes@hey.com>
Co-authored-by: Michael Kohl <citizen428@dev.to>
2020-12-01 12:22:07 -05:00

14 lines
296 B
Ruby

module Api
module V0
module Admin
class ConfigsController < ApiController
before_action :authenticate_with_api_key_or_current_user!
before_action :authorize_super_admin
def show
@site_configs = SiteConfig.all
end
end
end
end
end