noosfero | Implemented invite members to community (!1164)

Victor Costa gitlab at mg.gitlab.com
Fri Apr 7 16:47:31 BRT 2017


New comment for Merge Request !1164 on app/api/v1/communities.rb:

https://gitlab.com/noosfero/noosfero/merge_requests/1164#note_27079532

>          end
>  
>          get ':id' do
> +          puts "Get:ID #{params[:id]} => params #{params}"
>            community = profiles_for_person(environment.communities, current_person).find_by_id(params[:id])
>            not_found! unless community.present?
>            present_partial community, :with => Entities::Community, :current_person => current_person, :params => params
>          end
>  
> +        post '/:id/invite' do
> +          community = Community.find(params[:id])
> +          contacts_to_invite = params[:contacts]
> +          contacts_to_invite = params[:contacts].split(',')
> +          Delayed::Job.enqueue InvitationJob.new(current_person.id, contacts_to_invite, '', community.id, nil, I18n.locale)

you should return some response to be consumed by the client


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20170407/046dcf18/attachment-0001.html>


More information about the Noosfero-dev mailing list