* 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>
14 lines
296 B
Ruby
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
|