TechForPR / chefsForPR

Platform to manage the distribution of meals created by World Kitchen
http://chefs4pr.com
MIT License
3 stars 2 forks source link

Create a model to store food requests #3

Closed dvidsilva closed 7 years ago

dvidsilva commented 7 years ago

Users need to be able to request food, called Solicitud de comidas.

It needs a model to store the data, the properties should be, the ones with *asterisk are required.

Make the phone or email required, meaning at least one or the other need to be in order for it to be valid. Find some help here

We need a short id so that people can track the status of a request by calling later or something. It has to unique and auto generated, but just a few characters, as opposed to the long mongo id. or it can be a subset of the long id.

Create the post endpoint that can be used by the frontend to store this data. The endpoint can be POST /api/request. Respond with errors if failure, or the short id if it works.

Create an endpoint to verify that the request exists /api/request/:id and /api/request/status/:shortId that respond with all the data in the request.

dvidsilva commented 7 years ago

Pull request that fixes this in #11