Skip to content

Commit

Permalink
set V2_REGISTRATIONS_POLL_URL as optional in local
Browse files Browse the repository at this point in the history
  • Loading branch information
FinnIckler committed Oct 28, 2024
1 parent 544184e commit 83716ad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/webpacker/lib/requests/routes.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ export const panelUrls = {
export const userPreferencesRoute = `<%= CGI.unescape(Rails.application.routes.url_helpers.profile_edit_path)%>?section=preferences`;

export const pollingRoute = (userId, competitionId) => ({
v2: `<%= CGI.unescape(EnvConfig.V2_REGISTRATIONS_POLL_URL)%>?attendee_id=${competitionId}-${userId}`,
v3: `<%= CGI.unescape(EnvConfig.V3_REGISTRATIONS_POLL_URL)%>?competition_id=${competitionId}&user_id=${userId}`
v2: `<%= EnvConfig.V2_REGISTRATIONS_POLL_URL %>?attendee_id=${competitionId}-${userId}`,
v3: `<%= EnvConfig.V3_REGISTRATIONS_POLL_URL %>?competition_id=${competitionId}&user_id=${userId}`
});

export const wcaRegistrationUrl = `<%= CGI.unescape(EnvConfig.WCA_REGISTRATIONS_URL)%>`;
Expand Down
12 changes: 7 additions & 5 deletions env_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
mandatory :WCA_REGISTRATIONS_URL, :string
mandatory :ASSET_HOST, :string
mandatory :CDN_ASSETS_DISTRIBUTION_ID, :string

if is_compiling_assets
mandatory :V2_REGISTRATIONS_POLL_URL, :string
mandatory :V3_REGISTRATIONS_POLL_URL, :string
end
else
optional :READ_REPLICA_HOST, :string, ''
optional :CACHE_REDIS_URL, :string, ''
Expand All @@ -52,6 +57,8 @@
optional :WCA_REGISTRATIONS_POLL_URL, :string, ''
optional :PAYPAL_BASE_URL, :string, ''
optional :WRC_WEBHOOK_URL, :string, ''
optional :V2_REGISTRATIONS_POLL_URL, ''
optional :V3_REGISTRATIONS_POLL_URL, ''

# Local-specific stuff
optional :DISABLE_BULLET, :bool, false
Expand All @@ -60,11 +67,6 @@
mandatory :WCA_REGISTRATIONS_BACKEND_URL, :string
end

if is_compiling_assets
mandatory :V2_REGISTRATIONS_POLL_URL, :string
mandatory :V3_REGISTRATIONS_POLL_URL, :string
end

if Rails.env.test?
optional :DISABLE_WEBMOCK, :bool, false
optional :DISABLE_NET_CONNECT_IN_TESTS, :bool, false
Expand Down

0 comments on commit 83716ad

Please sign in to comment.