2018-09-23 15:44:14 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2015-04-30 13:06:18 -04:00
|
|
|
class Profiles::AvatarsController < Profiles::ApplicationController
|
2013-12-02 13:03:07 -05:00
|
|
|
def destroy
|
|
|
|
@user = current_user
|
|
|
|
|
2017-09-27 05:48:33 -04:00
|
|
|
Users::UpdateService.new(current_user, user: @user).execute { |user| user.remove_avatar! }
|
2013-12-11 10:30:22 -05:00
|
|
|
|
2018-07-02 06:43:06 -04:00
|
|
|
redirect_to profile_path, status: :found
|
2013-12-02 13:03:07 -05:00
|
|
|
end
|
|
|
|
end
|