1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-29 18:52:22 +01:00

fixes change role API

This commit is contained in:
Sylvain 2020-05-04 18:34:26 +02:00
parent 06a5bff084
commit d8a289e825

View File

@ -205,8 +205,8 @@ class API::MembersController < API::ApiController
def update_role
authorize @member
user.remove_role @member.role.to_sym
user.add_role params[:role]
@member.remove_role @member.role.to_sym
@member.add_role params[:role]
render json: @member
end