Skip to content

refactor: eliminate duplicate user lookup patterns#220

Merged
RUKAYAT-CODER merged 1 commit intorinafcode:mainfrom
sublime247:refactor/eliminate-duplicate-user-code
Mar 25, 2026
Merged

refactor: eliminate duplicate user lookup patterns#220
RUKAYAT-CODER merged 1 commit intorinafcode:mainfrom
sublime247:refactor/eliminate-duplicate-user-code

Conversation

@sublime247
Copy link
Copy Markdown
Contributor

  • Created reusable user utilities in src/common/utils/user.utils.ts
  • Handled exceptions like ensureUserExists seamlessly.
  • Extracted findUserOrThrow inside users.service.ts.
  • Adopted shared lookup mechanisms in auth.service.ts and payments.service.ts.
  • Enforced uniform exception types across user operations.

Close #206

- Created reusable user utilities in src/common/utils/user.utils.ts
- Handled exceptions like ensureUserExists seamlessly.
- Extracted findUserOrThrow inside users.service.ts.
- Adopted shared lookup mechanisms in auth.service.ts and payments.service.ts.
- Enforced uniform exception types across user operations.

Close rinafcode#206
@sublime247
Copy link
Copy Markdown
Contributor Author

@RUKAYAT-CODER please review

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 25, 2026

@sublime247 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER RUKAYAT-CODER merged commit 5a082ea into rinafcode:main Mar 25, 2026
5 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Eliminate Duplicate Code

2 participants