thoughtbot / ios-on-rails

A guide to building a Rails API and iOS app
Other
76 stars 6 forks source link

Nearest events endpoint should return structured data when no events exist #125

Open jakecraige opened 8 years ago

jakecraige commented 8 years ago

The endpoint current returns either: an array of events, or (if no events exist) {message: "No events"} and a status code of 200.

This makes the API tricky to use from languages which want to use structured response types. Instead it should return, for example, [] and a status of 200, or a message with a different response code.