diff --git a/config/settings.yml b/config/settings.yml index b568a354d6b..f543378b3d3 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -1695,3 +1695,7 @@ vye: schema_contract: appointments_index: 'modules/vaos/app/schemas/appointments_index.json' test_index: 'spec/fixtures/schema_contract/test_schema.json' + +analytics: + unique_user: + salt: 'fake-salt' \ No newline at end of file diff --git a/modules/analytics/app/controllers/HashesController.rb b/modules/analytics/app/controllers/HashesController.rb deleted file mode 100644 index 1c92752c368..00000000000 --- a/modules/analytics/app/controllers/HashesController.rb +++ /dev/null @@ -1,10 +0,0 @@ -module Analytics - module V0 - class HashesController < ApplicationController - def index - data = { hello: 'world' } - render json: data - end - end - end -end diff --git a/modules/analytics/app/controllers/analytics/v0/analytics_controller.rb b/modules/analytics/app/controllers/analytics/v0/analytics_controller.rb new file mode 100644 index 00000000000..46e7cc70cdc --- /dev/null +++ b/modules/analytics/app/controllers/analytics/v0/analytics_controller.rb @@ -0,0 +1,12 @@ +module Analytics + module V0 + class AnalyticsController < ApplicationController + skip_before_action :authenticate + + def index + data = { hello: 'world', salt: Settings.analytics.unique_user.salt } + render json: data + end + end + end +end diff --git a/modules/analytics/config/routes.rb b/modules/analytics/config/routes.rb index 64bc614cb4a..3394d39d479 100644 --- a/modules/analytics/config/routes.rb +++ b/modules/analytics/config/routes.rb @@ -2,6 +2,6 @@ Analytics::Engine.routes.draw do namespace :v0, defaults: { format: 'json' } do - get '/user/hashes', to: 'hashes#index' + get '/user/hashes', to: 'analytics#index' end end