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 routes #23

Open
ahmedisam99 opened this issue Sep 19, 2019 · 0 comments
Open

Backend routes #23

ahmedisam99 opened this issue Sep 19, 2019 · 0 comments
Labels
Backend This issue/PR is related to Backend project EPIC This is a general issue that will be later divided into several technical issues

Comments

@ahmedisam99
Copy link
Collaborator

Schema

All the responses will follow the following schema:

  • Success:
{code: Number, data: Object}
  • Fail/error:
{code: Number, error: String}

Routes

The following routes will be prefixed with /api/v1

  • GET /meals?category= :

request header will contain the category name
the response body will follow the following schema

{code: Number, data: Array }   // array of objects that will contain all meals of that category

  • POST /login: the request body will follow the following schema
{tableNumber: Number, secret: String}

  • POST /order
    Request body:
{ tableNumber: Number, createdAt: Date, totalPrice: Number, meals Array: [ { mealId, amount, price, salt, spicies, vegetables} ] }   

Response body:

{code: Number, data: object}  // the data object will contain the order number to be stored in the state object.

  • POST /feedback
    Request body
{ orderId: Number, email:String, feedback: String}

Respose body

{code: Number}
@ahmedisam99 ahmedisam99 added Backend This issue/PR is related to Backend project EPIC This is a general issue that will be later divided into several technical issues labels Sep 19, 2019
@ahmedisam99 ahmedisam99 pinned this issue Sep 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend This issue/PR is related to Backend project EPIC This is a general issue that will be later divided into several technical issues
Projects
None yet
Development

No branches or pull requests

1 participant