hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

[REFACTOR] Move Hardcoded Email Subjects to Constants Across the User Related Files

Open ThisIsMani opened this issue 5 months ago • 4 comments

Feature Description

In the current implementation, email subjects are hardcoded at multiple places across the codebase when constructing email content. To improve maintainability and avoid magic strings, each unique subject should be moved to its own constant. The goal of this issue is to identify all the places where email subjects are hardcoded, create a corresponding constant for each one, and replace the hardcoded values with the newly defined constants.

Possible Implementation

  • Search the codebase for all instances where email subjects are hardcoded. Example: https://github.com/juspay/hyperswitch/blob/b2364414edab6d44e276f2133bc988610693f155/crates/router/src/core/user.rs#L707
  • For each unique subject, create a new constant in crates/router/src/consts/user.rs.
  • Refactor the code by replacing the hardcoded subjects with their respective constants.

Have you spent some time checking if this feature request has been raised before?

  • [X] I checked and didn't find a similar issue

Submission Process:

  • Ask the maintainers for assignment of the issue, you can request for assignment by commenting on the issue itself.
  • Once assigned, submit a pull request (PR).
  • Maintainers will review and provide feedback, if any.
  • Maintainers can unassign issues due to inactivity, read more here.

Refer here for Terms and conditions for the contest.

ThisIsMani avatar Sep 18 '24 08:09 ThisIsMani