GithubHelp home page GithubHelp logo

zuri_netlify_backend's Introduction

zuri netlify backend

file structure

src

|---controllers

|--UserAuth.js

|

|---models

|--RegistrationDetails.js

|

|--routes.js

|

|--server.js

API REFERENCES

REGISTRATION API

post api: https://zuri-netlify-backend.herokuapp.com/apis/register

parameter: email, password

example of expected payload: { "email":"[email protected]", "password": "1234567" }

on successfull post request: { "statusCode": 201,

"message": "user signedup successfully",

"payload": {

"email": "[email protected]",

token } } }

EMAIL CHECK API

post api: https://zuri-netlify-backend.herokuapp.com/apis/checkemail

parameter: email

example of expected payload: {

}

on successful post request: {

"statusCode": 200,

"message": "user can continue with registration"

}

unsuccessful post request: {

 "statusCode": 400,
 
"message": "email already in use by another user"

}

LOGIN API

post api: https://zuri-netlify-backend.herokuapp.com/apis/login

parameter: email, password

example of expected payload: {

email: [email protected],

password: ************

}

successful post request: {

 "statusCode": 201,

"message": "login successfull",

"user": {

"_id": "60e5e4ebeb90032f785a7b74",

"email": "[email protected]",

"password": "$2b$10$pcnpXqDGGNN6cIhrODWaDeSqHhzmqMLhZAng9HramJo1DWUAHx17S",

"planType": "basic",

"card": {

  "firstName": "osuji",
  
  "lastName": "Chiaka",
  
  "cardNumber": "1234567890123456",
  
  "expirationDate": "2/21",
  
  "ccv": "551"
},

"createdAt": "2021-07-07T17:31:23.434Z",

"updatedAt": "2021-07-07T17:31:23.434Z",

"__v": 0

},

"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MGU1ZTRlYmViOTAwMzJmNzg1YTdiNzQiLCJpYXQiOjE2MjU2ODE3MDcsImV4cCI6MTYyNTc2ODEwN30.47-PglP21cj1XZ9e2xIHa3tywLQ9aDupw2gn4AaELo4"

}

example of unsuccessfull post request: {

"statusCode": 400,

"message": "incorrect email or password"

}

zuri_netlify_backend's People

Contributors

chiaka1996 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.