app/controllers/int_api/marketplaces_controller.rb
# This could be more logical in different controller, but as implementing
# at this point only tiny int-api with 2 methods, using one controller
This could be more logical in different controller, but as implementing
at this point only tiny int-api with 2 methods, using one controller
This could be more logical in different controller but as implementing at this point only tiny int - api with 2 methods using one controller
def check_email_availability
    email = params[:email]
    render :json => ["email parameter missing"], :status => 400 and return if email.blank?
    ProspectEmail.create(:email => params[:email])
    response.status = 200
    render :json => {:email => email, :available => (Email.email_available?(email))} and return
  end
def check_email_availability email = params [ :email ] render :json => [ "email parameter missing" ] , :status => 400 and return if email . blank? ProspectEmail . create ( :email => params [ :email ] ) response . status = 200 render :json => { :email => email , :available => ( Email . email_available? ( email ) ) } and return end
This could be more logical in different controller, but as implementing
at this point only tiny int-api with 2 methods, using one controller
This could be more logical in different controller but as implementing at this point only tiny int - api with 2 methods using one controller
# When email availability has been asked, store that email to DB