diff options
Diffstat (limited to 'app/controllers/v1')
-rw-r--r-- | app/controllers/v1/users_controller.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/v1/users_controller.rb b/app/controllers/v1/users_controller.rb index 006e6d8..881708a 100644 --- a/app/controllers/v1/users_controller.rb +++ b/app/controllers/v1/users_controller.rb @@ -19,8 +19,12 @@ module V1 end def create - @user = Account.create(params[:user]) - respond_with @user # return ID instead? + if APP_CONFIG[:allow_registration] + @user = Account.create(params[:user]) + respond_with @user # return ID instead? + else + head :forbidden + end end def update |