Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

add basic api for google feed settings

wjwitekf59adcdd64fe
diff --git a/api/app/controllers/spree/api/v2/platform/google_feed_settings_controller.rb b/api/app/controllers/spree/api/v2/platform/google_feed_settings_controller.rb
new file mode 100644
index 0000000000..d697aa7d32
--- /dev/null
+++ b/api/app/controllers/spree/api/v2/platform/google_feed_settings_controller.rb
@@ -0,0 +1,16 @@
+module Spree
+ module Api
+ module V2
+ module Platform
+ class GoogleFeedSettingsController < ResourceController
+ private
+
+ def model_class
+ Spree::GoogleFeedSetting
+ end
+ end
+ end
+ end
+ end
+end
+
diff --git a/api/app/serializers/spree/api/v2/platform/google_feed_setting_serializer.rb b/api/app/serializers/spree/api/v2/platform/google_feed_setting_serializer.rb
new file mode 100644
index 0000000000..8e4e418bcc
--- /dev/null
+++ b/api/app/serializers/spree/api/v2/platform/google_feed_setting_serializer.rb
@@ -0,0 +1,11 @@
+module Spree
+ module Api
+ module V2
+ module Platform
+ class GoogleFeedSettingSerializer < BaseSerializer
+ include ResourceSerializerConcern
+ end
+ end
+ end
+ end
+end
diff --git a/api/config/routes.rb b/api/config/routes.rb
index 07959c553d..1c8559ec2f 100644
--- a/api/config/routes.rb
+++ b/api/config/routes.rb
@@ -199,6 +199,9 @@ Spree::Core::Engine.add_routes do
# Store API
resources :stores
+ # Google Feed Setting API
+ resources :google_feed_settings
+
# Configurations API
resources :payment_methods
resources :shipping_categories