mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
17 lines
365 B
Ruby
17 lines
365 B
Ruby
# frozen_string_literal: true
|
|
|
|
class SettingsController < ApplicationController
|
|
before_action :authenticate_user!
|
|
|
|
def theme
|
|
current_user.update(theme: params[:theme])
|
|
|
|
redirect_back(fallback_location: root_path)
|
|
end
|
|
|
|
def generate_api_key
|
|
current_user.update(api_key: SecureRandom.hex)
|
|
|
|
redirect_back(fallback_location: root_path)
|
|
end
|
|
end
|