Skip to content

Commit

Permalink
Added resend confirmation link
Browse files Browse the repository at this point in the history
  • Loading branch information
dhochbaum-dcp committed Dec 11, 2024
1 parent eed665a commit 2b38cd2
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions client/app/controllers/subscribe.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,17 @@ export default class SubscribeController extends Controller {
}
} else if (this.emailNeedsConfirmation) {
// Run the script to confirm the email
// Endpoint does not yet exist
this.set('emailSent', true);
try {
const response = await fetch(`${ENV.host}/subscribers/${this.model.email}/resend-confirmation`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
});
this.set('emailSent', true);
} catch (error) {
console.error(error);

Check warning on line 84 in client/app/controllers/subscribe.js

View workflow job for this annotation

GitHub Actions / Tests

Unexpected console statement
}
}
}

Expand Down

0 comments on commit 2b38cd2

Please sign in to comment.