Class: G5IntegrationsUpdatable::FeedsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/g5_integrations_updatable/feeds_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



5
6
7
8
# File 'app/controllers/g5_integrations_updatable/feeds_controller.rb', line 5

def create
  G5IntegrationsUpdatable::FeedProcessor.new(feed_url: params[:feed_url]).process
  render json: {}, status: 201
end

#indexObject



10
11
12
13
# File 'app/controllers/g5_integrations_updatable/feeds_controller.rb', line 10

def index
  @location_settings = G5IntegrationsUpdatable::LocationSetting.all
  render json: @location_settings, each_serializer: G5IntegrationsUpdatable::LocationSettingSerializer
end