Initial commit
This commit is contained in:
20
app/controllers/api/json/organizations_controller.rb
Normal file
20
app/controllers/api/json/organizations_controller.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
class Api::Json::OrganizationsController < Api::ApplicationController
|
||||
include CartoDB
|
||||
|
||||
ssl_required :show, :users
|
||||
|
||||
# Fetch info from the current user orgranization
|
||||
def show
|
||||
render json: {}.to_json if current_user.organization.nil?
|
||||
|
||||
render json: current_user.organization.to_poro
|
||||
end
|
||||
|
||||
# Return user list of current user organization
|
||||
def users
|
||||
render json: {}.to_json if current_user.organization.nil?
|
||||
|
||||
render json: current_user.organization.to_poro[:users]
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user