Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add max length check for email #1508

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LashaJini
Copy link
Contributor

@LashaJini LashaJini commented Mar 29, 2024

What kind of change does this PR introduce?

feature: add max length check for email.

What is the current behavior?

Currently, email length is only checked on db side. Email has max length 255 characters, when user sends (>255 characters) large email to /admin/users endpoint, db is doing unnecessary queries.

Screenshot from 2024-03-30 02-40-54

What is the new behavior?

Code returns early if user enters large email. There will be no db queries.

Screenshot from 2024-03-30 02-44-31

@LashaJini LashaJini marked this pull request as ready for review March 29, 2024 23:03
@LashaJini LashaJini requested a review from a team as a code owner March 29, 2024 23:03
@coveralls
Copy link

Pull Request Test Coverage Report for Build 8486361636

Details

  • 1 of 3 (33.33%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.007%) to 65.12%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/api/mail.go 1 3 33.33%
Totals Coverage Status
Change from base Build 8482872008: -0.007%
Covered Lines: 8026
Relevant Lines: 12325

💛 - Coveralls

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.

None yet

2 participants