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

POST | /signup #14

Closed
4 tasks done
Israa91 opened this issue Jan 31, 2021 · 0 comments · Fixed by #105
Closed
4 tasks done

POST | /signup #14

Israa91 opened this issue Jan 31, 2021 · 0 comments · Fixed by #105
Assignees
Labels

Comments

@Israa91
Copy link
Collaborator

Israa91 commented Jan 31, 2021

relates #5

Route: POST api/v1/signup

Acceptance Criteria

  • Validation
  • DB query
  • Response
  • Testing

Validation

{
 username: yup.string().alphanum().min(5).required(),
 email: yup.string().email().required(),
 password: yup.string().min(8).required(),
 confirmPassword: yup.string().oneOf([yup.ref('password'), null], 'Passwords must match')
}

DB query

INSERT INTO users(user_name,email,password) VALUES(user_name,email,password);

Response

  • Success
{ 
  StatusCode: 200,
  message :"Sign up successful"
}
  • Failed
{
statusCode:401, 
message:"You are already registered"
}

Testing

to be a successful test

  • status === 200
  • data.length !== 0
Israa91 added a commit that referenced this issue Feb 15, 2021
Israa91 added a commit that referenced this issue Feb 15, 2021
@Israa91 Israa91 mentioned this issue Feb 15, 2021
@Israa91 Israa91 linked a pull request Feb 15, 2021 that will close this issue
Israa91 added a commit that referenced this issue Feb 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant