BrightCoders-Proyectos / tribo-web

0 stars 0 forks source link

Realization of the CRUD of Marketplaces for API #63

Closed YilKanda closed 3 years ago

YilKanda commented 3 years ago

Description

A method was generated that allows you to view all the stores, as well as each one in particular.

Some examples that were done through the console are:

GET curl http://localhost:3000/api/v1/market_places/

POST curl -H "Content-Type: application/json" -d '{ "user_id":2, "business_name":"Comida Sana", "address":"Direccion Imaginación", "district":"Colima", "postcode":66600, "business_line":"Food", "pickup_type":"No", "latitud":-1.00123,"longitud":29.00002, "open_hour":"2000-01-01T10:00:00.000Z", "close_hour":"2000-01-01T20:00:00.000Z", "service_days":"Sunday", "payment":"Yes", "selling":"Yes" }' -X POST http://localhost:3000/api/v1/market_places

PUT curl -X PUT -H "Content-Type: application/json" -d '{"address":"Start Death","postcode":12345}' http://localhost:3000/api/v1/market_places/13

DELETE curl -X DELETE http://localhost:3000/api/v1/market_places/18

For POST, PUT, and DELETE methods, you need to log in from sign_in_path.

The login page must be opened in the ReactNative application, in order to access the necessary methods.