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

#160875996 Admin can add new meal options to the menu #51

Merged
merged 1 commit into from
Oct 4, 2018

Conversation

akhilome
Copy link
Owner

@akhilome akhilome commented Oct 4, 2018

What does this PR do?

Creates endpoint to allow only registered users of the API who are admins add new meals to the database

Description of Task to be completed?

  • create a POST /api/v1/menu which can be used by just admins
  • write test for the endpoint

How should this be manually tested?

Clone the project repo, cd into the project directory

git clone https://github.com/akhilome/fast-food-fast.git && cd fast-food-fast

install dependencies and setup db

rename .env.example to .env and configure appropriately, then run

npm i && npm run setup-testdb && npm run seed-db
  • open up postman and sign up for an admin account using the email hovkard@gmail.com
  • login to the account to get a valid auth token
  • send a POST request to http://localhost:3000/api/v1/menu providing at least a foodName which is a string and a price which is a number in the body section.

What are the relevant pivotal tracker stories?

#160875996

- create a POST /api/v1/menu which can be used by just admins
- write test for the endpoint

[Finishes #160875996]
@akhilome akhilome merged commit 8d750d7 into develop Oct 4, 2018
@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 88.15% when pulling 82aab9b on ft-add-food-160875996 into 2b35ba0 on develop.

@akhilome akhilome deleted the ft-add-food-160875996 branch October 8, 2018 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants