Open ap2322 opened 4 years ago
Client can sent a request to post /api/v1/reports with a json payload and the location is checked in the database and a report is made in the db.
post /api/v1/reports
Example Request:
POST /api/v1/reports payload: {. report: { category: this.state.isSnowRemoval ? ‘snow_removal’ : ‘other’, description: this.state.description, image: this.state.images, email: this.state.email }, location: { lat: ‘’, lon: ‘’ } }
Example response (iteration 1)
HTTP Status 201 Created body: { message: "Success, your report has been created"}
Endpoint functions:
locations
reports
locations_id
Future iterations
locations.address_desc
puppeteer
Client can sent a request to
post /api/v1/reports
with a json payload and the location is checked in the database and a report is made in the db.Example Request:
Example response (iteration 1)
Endpoint functions:
locations
table with lat, longreports
table withlocations_id
foreign keyFuture iterations
locations.address_desc
from Google GeoServicepuppeteer
functions to make 311 report