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 | 38 | post "/register" do |
39 | 39 | binding.pry |
40 | 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 | 42 | attrs[:password_confirmation] = attrs[:password] |
43 | 43 | |
44 | 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 | 2 | module API |
3 | 3 | module V1 |
4 | 4 | class Environments < Grape::API |
5 | - before { authenticate! } | |
6 | 5 | |
7 | 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 | 8 | desc "Return the person information" |
18 | 9 | get '/signup_person_fields' do |
19 | 10 | present environment.signup_person_fields | ... | ... |