fix(email): correct signature reminder URL path

Change signature URL in reminder emails from '/sign?doc=' to '/?doc='
to match the correct frontend route.

Updated in:
- ReminderService.sendSingleReminder
- ReminderAsyncService.queueSingleReminder
- Email helper tests
This commit is contained in:
Benjamin
2025-11-06 01:09:44 +01:00
parent 2dd7d8686c
commit 7b1f69ade6
3 changed files with 4 additions and 4 deletions

View File

@@ -142,7 +142,7 @@ func (s *ReminderService) sendSingleReminder(
"recipient_name", recipientName,
"sent_by", sentBy)
signURL := fmt.Sprintf("%s/sign?doc=%s", s.baseURL, docID)
signURL := fmt.Sprintf("%s/?doc=%s", s.baseURL, docID)
log := &models.ReminderLog{
DocID: docID,

View File

@@ -139,7 +139,7 @@ func (s *ReminderAsyncService) queueSingleReminder(
"recipient_name", recipientName,
"sent_by", sentBy)
signURL := fmt.Sprintf("%s/sign?doc=%s", s.baseURL, docID)
signURL := fmt.Sprintf("%s/?doc=%s", s.baseURL, docID)
// Prepare email data (keys must match template variables)
data := map[string]interface{}{

View File

@@ -146,7 +146,7 @@ func TestSendSignatureReminderEmail(t *testing.T) {
locale: "en",
docID: "doc123",
docURL: "https://example.com/doc.pdf",
signURL: "https://example.com/sign?doc=doc123",
signURL: "https://example.com/?doc=doc123",
recipientName: "John Doe",
expectedSubject: "Reminder: Document reading confirmation required",
sendError: nil,
@@ -158,7 +158,7 @@ func TestSendSignatureReminderEmail(t *testing.T) {
locale: "fr",
docID: "doc456",
docURL: "https://exemple.fr/document.pdf",
signURL: "https://exemple.fr/sign?doc=doc456",
signURL: "https://exemple.fr/?doc=doc456",
recipientName: "Marie Dupont",
expectedSubject: "Rappel : Confirmation de lecture de document requise",
sendError: nil,