From f1a148c77cf62faa930ac965a4045ee8a7c7b8be Mon Sep 17 00:00:00 2001 From: Joe Masilotti Date: Mon, 23 Oct 2023 14:53:52 -0700 Subject: [PATCH] Version path configuration (#68) --- Demo/Demo/SceneDelegate.swift | 2 +- Demo/Server/app/controllers/configurations_controller.rb | 2 +- Demo/Server/config/routes.rb | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Demo/Demo/SceneDelegate.swift b/Demo/Demo/SceneDelegate.swift index bed164e..d099f8e 100644 --- a/Demo/Demo/SceneDelegate.swift +++ b/Demo/Demo/SceneDelegate.swift @@ -9,7 +9,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { private lazy var turboNavigator = TurboNavigator(delegate: self, pathConfiguration: pathConfiguration) private lazy var pathConfiguration = PathConfiguration(sources: [ - .server(baseURL.appendingPathComponent("/configuration")) + .server(baseURL.appendingPathComponent("/configurations/ios_v1.json")) ]) func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { diff --git a/Demo/Server/app/controllers/configurations_controller.rb b/Demo/Server/app/controllers/configurations_controller.rb index dfe1f1b..ac6556b 100644 --- a/Demo/Server/app/controllers/configurations_controller.rb +++ b/Demo/Server/app/controllers/configurations_controller.rb @@ -1,5 +1,5 @@ class ConfigurationsController < ApplicationController - def show + def ios_v1 render json: { settings: [], rules: [ diff --git a/Demo/Server/config/routes.rb b/Demo/Server/config/routes.rb index da81e4e..06c57e9 100644 --- a/Demo/Server/config/routes.rb +++ b/Demo/Server/config/routes.rb @@ -14,7 +14,9 @@ end end - resource :configuration, only: :show + resources :configurations, only: [] do + get "ios_v1", on: :collection + end root "dashboards#show" end