Class: Import::PropertiesController

Inherits:
ApplicationApiController
  • Object
show all
Defined in:
app/controllers/pwb/import/properties_controller.rb

Instance Method Summary collapse

Instance Method Details

#retrieve_from_mlsObject



12
13
14
15
16
17
18
# File 'app/controllers/pwb/import/properties_controller.rb', line 12

def retrieve_from_mls
  imported_properties = Pwb::ImportProperties.new(params[:file]).import_mls_tsv
  # Pwb::Prop.import(params[:file])
  render json: {
    retrieved_items: imported_properties
  }
end

#retrieve_from_pwbObject



4
5
6
7
8
9
10
# File 'app/controllers/pwb/import/properties_controller.rb', line 4

def retrieve_from_pwb
  imported_properties = Pwb::ImportProperties.new(params[:file]).import_csv
  render json: {
    retrieved_items: imported_properties
  }
  # return render json: { "success": true }, status: :ok, head: :no_content
end