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

Backend validation for POST /leads endpoint #144

Open
5 tasks
galbwe opened this issue Oct 5, 2021 · 11 comments · May be fixed by #227
Open
5 tasks

Backend validation for POST /leads endpoint #144

galbwe opened this issue Oct 5, 2021 · 11 comments · May be fixed by #227
Labels

Comments

@galbwe
Copy link
Collaborator

galbwe commented Oct 5, 2021

Add the following validation to the POST /leads endpoint. Feel free to add marshmallow or pydantic as a dependency if it simplifies matters.

  • assigned field must be the username of a registered user
  • company name field cannot be null or blank
  • email field must be a properly formatted email address (don't worry about checking that it is a real email yet)
  • phone field must be in the format (###) ###-#### or ###-####
  • website, linkedin, twitter, facebook, and instagram fields must be properly formatted urls
@galbwe galbwe added backend Hacktoberfest Hacktoberfest 2021 labels Oct 5, 2021
@kaleeaswari
Copy link
Collaborator

@galbwe Could you assign this issue to me?

@galbwe
Copy link
Collaborator Author

galbwe commented Oct 20, 2021

Hi @kaleeaswari would you rather work on this or #201 ? Due to the number of Hacktoberfest contributors, I'm trying to assign people to one issue at a time until they have a PR ready.

@galbwe
Copy link
Collaborator Author

galbwe commented Oct 21, 2021

@kaleeaswari do you want to be assigned now that #201 is closed?

@kaleeaswari
Copy link
Collaborator

kaleeaswari commented Oct 21, 2021 via email

@galbwe
Copy link
Collaborator Author

galbwe commented Oct 21, 2021

Okay great. Do you mind leaving a comment on #199 saying you want to be assigned? At the moment the repo doesn't let me assign you an issue unless you have commented on it.

@kaleeaswari
Copy link
Collaborator

kaleeaswari commented Oct 21, 2021 via email

@kaleeaswari
Copy link
Collaborator

kaleeaswari commented Oct 22, 2021 via email

@galbwe
Copy link
Collaborator Author

galbwe commented Oct 22, 2021

If you are running the app in docker compose, you should be able to access the container logs with docker compose logs api. Likewise, the database logs are available by running docker compose logs postgres.

@galbwe
Copy link
Collaborator Author

galbwe commented Oct 22, 2021

The check that is failing is the formatter. You should be able to fix it by running ./scripts/format.sh in the backend directory.

@kaleeaswari
Copy link
Collaborator

kaleeaswari commented Oct 22, 2021 via email

@galbwe galbwe removed the Hacktoberfest Hacktoberfest 2021 label Nov 2, 2021
@TueeNguyen
Copy link
Collaborator

TueeNguyen commented Nov 5, 2021

Hi @galbwe, if there is no pull request, can I work on this issue?

@TueeNguyen TueeNguyen linked a pull request Nov 18, 2021 that will close this issue
10 tasks
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.

3 participants