Albums almost done, group, chat moderation, photo, video page updates
This commit is contained in:
mgabdev
2020-12-21 13:25:05 -05:00
parent a2ffbadedb
commit ee91809e8d
45 changed files with 1013 additions and 509 deletions

View File

@@ -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')

View File

@@ -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')