You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
348 B

  1. # frozen_string_literal: true
  2. class Api::Web::SettingsController < Api::Web::BaseController
  3. before_action :require_user!
  4. def update
  5. setting.data = params[:data]
  6. setting.save!
  7. render_empty
  8. end
  9. private
  10. def setting
  11. @_setting ||= ::Web::Setting.where(user: current_user).first_or_initialize(user: current_user)
  12. end
  13. end