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

Sign up / Sign in fetching #26

Open
2 tasks
XenomShox opened this issue Mar 24, 2020 · 1 comment
Open
2 tasks

Sign up / Sign in fetching #26

XenomShox opened this issue Mar 24, 2020 · 1 comment

Comments

@XenomShox
Copy link
Member

XenomShox commented Mar 24, 2020

Hi there, we need the log in / sign up form to work, we're a bit late, so hani is done with the forms, what remains now is the functions that will fetch the user data.
to sign up a user, he need to put these infos, (every infos i required):

  • firstName: String.
  • lastName: String.
  • sex: String (its gonna be a drop down, or some radio buttons to check).
  • date_of_birth: String (basic date input, but the format has to be years-months-days).
  • location: String (where he lives).
  • phone: String.
  • password: String.
  • covid_19_test: Boolean (if the dude is tested positive to covid19).

to sign in a user, he need to put these infos, (every infos i required):

  • phone: String.
  • password: String.

Note: those are the name of the properties you're gonna use in the ... i dunno data {}, it has to follow these nominations.

So basicly this is what has to be done:

  • Create some function that will fetch the url: /api/auth/signup - POST, to create a user
  • Create some function that will fetch the url: /api/auth/signin - POST, to get a user

the Result of both these requests if everything is correct, is going to be a json object containing all his infos beside his phone and password.

@XenomShox XenomShox changed the title Sign up / Sign in Sign up / Sign in fetching Mar 24, 2020
@6youss
Copy link
Collaborator

6youss commented May 9, 2020

Hello, i've made the signup request as you can see in this file https://github.com/MicroClub-USTHB/Zitcode19/blob/dev/app-client/api/auth.js

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