Skip to content

Commit 82ad995

Browse files
authored
Make the env var change non-breaking (#778)
* Fix typo in environment variable for sender address Make the env var change non-breaking. * Fix formatting of environment variable access
1 parent 3013775 commit 82ad995

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

db/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package main
22

33
import (
4+
"cmp"
45
"database/sql"
56
"encoding/json"
67
"errors"
@@ -977,7 +978,7 @@ func onBootstrapHandler() func(se *core.BootstrapEvent) error {
977978
if v := os.Getenv("ORIGIN"); v != "" {
978979
e.App.Settings().Meta.AppURL = v
979980
}
980-
if v := os.Getenv("POCKETBASE_SMTP_SENDER_ADDRESS"); v != "" {
981+
if v := cmp.Or(os.Getenv("POCKETBASE_SMTP_SENDER_ADDRESS"), os.Getenv("POCKETBASE_SMTP_SENDER_ADRESS")); v != "" {
981982
e.App.Settings().Meta.SenderAddress = v
982983
}
983984
if v := os.Getenv("POCKETBASE_SMTP_SENDER_NAME"); v != "" {

0 commit comments

Comments
 (0)