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 #11

Closed
4 tasks done
ElhamFadel opened this issue Oct 24, 2021 · 0 comments
Closed
4 tasks done

POST | /signup #11

ElhamFadel opened this issue Oct 24, 2021 · 0 comments

Comments

@ElhamFadel
Copy link
Contributor

ElhamFadel commented Oct 24, 2021

Route: POST api/v1/signup

Acceptance criteria:

  • Validation
  • DB query
  • Response
  • test

Request body

req.body={
  name,
email,
location,
phone,
password
}

DB query

INSERT INTO agent(name, email, password, location,phone) VALUES ($1, $2, $3, $4,$5)

RESPONSE

Success

{
statusCode:201, 
msg:"operation accomplished successfully"
}

Failed

  • email or phone exists
    Email
{
statusCode:409, 
message:"email  is already exists!"
}

Phone

{
statusCode:409, 
message:"phone  is already exists!"
}
  • validation error
{ 
statusCode:400,
message : "Bad request" 
}
@ElhamFadel ElhamFadel self-assigned this Oct 25, 2021
ElhamFadel added a commit that referenced this issue Oct 25, 2021
ElhamFadel added a commit that referenced this issue Oct 25, 2021
ElhamFadel added a commit that referenced this issue Oct 26, 2021
ElhamFadel added a commit that referenced this issue Oct 27, 2021
ElhamFadel added a commit that referenced this issue Oct 27, 2021
ElhamFadel added a commit that referenced this issue Oct 27, 2021
ElhamFadel added a commit that referenced this issue Oct 27, 2021
ElhamFadel added a commit that referenced this issue Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants