Skip to content

Conversation

@d4rk5eed
Copy link

No description provided.

@d4rk5eed d4rk5eed requested review from DmitryKK and Virviil April 17, 2018 18:03
Copy link
Member

@Virviil Virviil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А вообще ты проверял что будет, если не задать хост?

Так то это изменение вообще никому в мире не надо, но по крайней мере надо же дефолтные значения сохранить для тех, кому не надо менять хост (для всех)

defp base_url(route) do
fn token -> @base_url <> token <> route end
defp base_url(%Agala.Provider.Telegram.Conn.ProviderParams{} = params) do
"https://" <> params.host <> params.token
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Упадёт если хост пустой

end

defp base_url(conn) do
"https://" <> (conn.request_bot_params.provider_params.host) <> "/bot"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Упадёт если хост пустой

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants