Commit 966b86fbb6ab25e5e7aba196a69b25521e3ebf58
1 parent
e93a8be9
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
adding signup field on user creation
Showing
2 changed files
with
1 additions
and
10 deletions
Show diff stats
lib/noosfero/api/session.rb
@@ -38,7 +38,7 @@ module Noosfero | @@ -38,7 +38,7 @@ module Noosfero | ||
38 | post "/register" do | 38 | post "/register" do |
39 | binding.pry | 39 | binding.pry |
40 | unique_attributes! User, [:email, :login] | 40 | unique_attributes! User, [:email, :login] |
41 | - attrs = attributes_for_keys [:email, :login, :password] | 41 | + attrs = attributes_for_keys [:email, :login, :password] + environment.signup_person_fields |
42 | attrs[:password_confirmation] = attrs[:password] | 42 | attrs[:password_confirmation] = attrs[:password] |
43 | 43 | ||
44 | remote_ip = (request.respond_to?(:remote_ip) && request.remote_ip) || (env && env['REMOTE_ADDR']) | 44 | remote_ip = (request.respond_to?(:remote_ip) && request.remote_ip) || (env && env['REMOTE_ADDR']) |
lib/noosfero/api/v1/environments.rb
@@ -2,18 +2,9 @@ module Noosfero | @@ -2,18 +2,9 @@ module Noosfero | ||
2 | module API | 2 | module API |
3 | module V1 | 3 | module V1 |
4 | class Environments < Grape::API | 4 | class Environments < Grape::API |
5 | - before { authenticate! } | ||
6 | 5 | ||
7 | resource :environment do | 6 | resource :environment do |
8 | 7 | ||
9 | - # Get environment object | ||
10 | - # | ||
11 | - # Example Request: | ||
12 | - # GET /environment | ||
13 | - get do | ||
14 | - present environment, :with => Entities::Environment | ||
15 | - end | ||
16 | - | ||
17 | desc "Return the person information" | 8 | desc "Return the person information" |
18 | get '/signup_person_fields' do | 9 | get '/signup_person_fields' do |
19 | present environment.signup_person_fields | 10 | present environment.signup_person_fields |