Skip to content

Commit

Permalink
Mobile web base url can now be set using MOBILE_WEB_BASE_URL env var
Browse files Browse the repository at this point in the history
  • Loading branch information
macoca committed Sep 27, 2017
1 parent 0fc7376 commit 71eace9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/ask/runtime/session.ex
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ defmodule Ask.Runtime.Session do
end

defp url(respondent_id) do
shorten("#{Ask.Endpoint.url}/mobile_survey/#{respondent_id}?token=#{Respondent.token(respondent_id)}")
shorten("#{mobile_base_url()}/mobile_survey/#{respondent_id}?token=#{Respondent.token(respondent_id)}")
end

defp mobile_base_url() do
System.get_env("MOBILE_WEB_BASE_URL") || Ask.Endpoint.url
end

defp shorten(url) do
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Ask.Mixfile do

def project do
[app: :ask,
version: "0.10.2",
version: "0.10.3",
elixir: "~> 1.2",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,
Expand Down

0 comments on commit 71eace9

Please sign in to comment.