Skip to content

Commit

Permalink
Update redirect path
Browse files Browse the repository at this point in the history
  • Loading branch information
zacksiri committed Feb 21, 2024
1 parent f7e77e2 commit 5b7ff87
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ if config_env() == :prod do
# Also, you may need to configure the Swoosh API client of your choice if you
# are not using SMTP. Here is an example of the configuration:
#
# config :polar, Polar.Mailer,
# adapter: Swoosh.Adapters.Mailgun,
# api_key: System.get_env("MAILGUN_API_KEY"),
# domain: System.get_env("MAILGUN_DOMAIN")
config :polar, Polar.Mailer,
adapter: Swoosh.Adapters.Postmark,
api_key: System.get_env("POSTMARK_API_KEY")

#
# For this example you need include a HTTP client required by Swoosh API client.
# Swoosh supports Hackney and Finch out of the box:
Expand Down
4 changes: 3 additions & 1 deletion lib/polar/accounts/user_notifier.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ defmodule Polar.Accounts.UserNotifier do

# Delivers the email using the application mailer.
defp deliver(recipient, subject, body) do
notifier = System.get_env("NOTIFIER_EMAIL", "[email protected]")

email =
new()
|> to(recipient)
|> from({"Polar", "[email protected]"})
|> from({"OpsMaru Image Server", notifier})
|> subject(subject)
|> text_body(body)

Expand Down
2 changes: 1 addition & 1 deletion lib/polar_web/controllers/streams/item_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule PolarWeb.Streams.ItemController do

endpoint = credential.space.cdn_host || default_cdn_host

url = Path.join(["https://", endpoint, bucket, item.path])
url = Path.join(["https://", endpoint, item.path])

redirect(conn, external: url)
end
Expand Down

0 comments on commit 5b7ff87

Please sign in to comment.