Skip to content

Commit

Permalink
Merge pull request #1477 from ministryofjustice/MLPAB-2486-vouch-star…
Browse files Browse the repository at this point in the history
…tpage-URL

MLPAB-2486: Add voucher start URL to invite email, extend default timeout to 30 seconds
  • Loading branch information
acsauk authored Sep 11, 2024
2 parents 54f60ea + 09235d2 commit 4440920
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/mlpa/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func run(ctx context.Context, logger *slog.Logger) error {
}
staticHash = url.QueryEscape(staticHash[3:11])

httpClient := &http.Client{Timeout: 10 * time.Second}
httpClient := &http.Client{Timeout: 30 * time.Second}

if xrayEnabled {
resource, err := ecs.NewResourceDetector().Detect(ctx)
Expand Down
1 change: 1 addition & 0 deletions internal/notify/email.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ type VoucherInviteEmail struct {
DonorFirstNamesPossessive string
DonorFirstNames string
LpaType string
VoucherStartPageURL string
}

func (s VoucherInviteEmail) emailID(isProduction bool) string {
Expand Down
1 change: 1 addition & 0 deletions internal/sharecode/sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ func (s *Sender) SendVoucherAccessCode(ctx context.Context, donor *donordata.Pro
DonorFirstNamesPossessive: appData.Localizer.Possessive(donor.Donor.FirstNames),
DonorFirstNames: donor.Donor.FirstNames,
LpaType: appData.Localizer.T(donor.Type.String()),
VoucherStartPageURL: s.appPublicURL + page.PathVoucherStart.Format(),
})
}

Expand Down
2 changes: 2 additions & 0 deletions internal/sharecode/sender_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1161,6 +1161,7 @@ func TestSendVoucherAccessCode(t *testing.T) {
DonorFirstNamesPossessive: "Possessive first names",
DonorFirstNames: "a",
LpaType: "translated type",
VoucherStartPageURL: "http://app" + page.PathVoucherStart.Format(),
}).
Return(nil)
return nc
Expand Down Expand Up @@ -1207,6 +1208,7 @@ func TestSendVoucherAccessCode(t *testing.T) {
DonorFirstNamesPossessive: "Possessive first names",
DonorFirstNames: "a",
LpaType: "translated type",
VoucherStartPageURL: "http://app" + page.PathVoucherStart.Format(),
}).
Return(nil)
return nc
Expand Down

0 comments on commit 4440920

Please sign in to comment.