Class: Notee::RolesController
Instance Method Summary
collapse
#restrict_access_json, #set_request_filter
Instance Method Details
#index ⇒ Object
6
7
8
|
# File 'app/controllers/notee/roles_controller.rb', line 6
def index
render json: { status: 'success', roles: User.roles }
end
|
#show ⇒ Object
10
11
12
13
14
15
16
17
18
|
# File 'app/controllers/notee/roles_controller.rb', line 10
def show
user = find_user_by_access_token
if user
render json: { status: 'success', role: user.role }
else
render json: { status: 'failed' }
end
end
|