Progress
Albums almost done, group, chat moderation, photo, video page updates
This commit is contained in:
@@ -21,9 +21,6 @@ class Settings::GroupCategoriesController < Admin::BaseController
|
||||
end
|
||||
|
||||
def destroy
|
||||
# : todo :
|
||||
# don't destroy if any groups have this category
|
||||
|
||||
@category.destroy!
|
||||
log_action :destroy, @category
|
||||
flash[:notice] = I18n.t('promotions.destroyed_msg')
|
||||
|
||||
@@ -26,6 +26,10 @@ class Settings::ProfilesController < Settings::BaseController
|
||||
else
|
||||
# : todo :
|
||||
# only allowed to change username once per day
|
||||
if params[:account][:username] && @account.username != params[:account][:username]
|
||||
Redis.current.set("username_change:#{account.id}", true)
|
||||
Redis.current.expire("username_change:#{account.id}", 24.huors.seconds)
|
||||
end
|
||||
|
||||
if UpdateAccountService.new.call(@account, account_params)
|
||||
redirect_to settings_profile_path, notice: I18n.t('generic.changes_saved_msg')
|
||||
|
||||
Reference in New Issue
Block a user