You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Endpoints like app.get("/api/history/:station") and app.get("/api/history/:station/case/:id") are well-named but ones like app.post("/api/add-case/:station") are a little confusing.
Generally it is good to try and only refer to the resource name in the end point and then specify the behaviour you want with the HTTP verb. So adding a case to a station would be via a POST to something like /api/stations/:stationId/case.
The text was updated successfully, but these errors were encountered:
Endpoints like
app.get("/api/history/:station")
andapp.get("/api/history/:station/case/:id")
are well-named but ones likeapp.post("/api/add-case/:station")
are a little confusing.Generally it is good to try and only refer to the resource name in the end point and then specify the behaviour you want with the HTTP verb. So adding a case to a station would be via a POST to something like
/api/stations/:stationId/case
.The text was updated successfully, but these errors were encountered: