summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/v1/company_licenses_controller.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/app/controllers/v1/company_licenses_controller.rb b/app/controllers/v1/company_licenses_controller.rb
index aa52b26..06d2145 100644
--- a/app/controllers/v1/company_licenses_controller.rb
+++ b/app/controllers/v1/company_licenses_controller.rb
@@ -1,2 +1,14 @@
-class V1::CompanyLicensesController
+class V1::CompanyLicensesController < ApplicationController
+ before_filter :load_company
+
+ def index
+ @active_licenses = @company.active_licenses
+ render json: @active_licenses
+ end
+
+ private
+
+ def load_company
+ @company = Company.find(params[:company_id])
+ end
end