AdamVig / GoCoApi

API Server for the GoCoStudent app.
https://gocostudent.adamvig.com/api
GNU General Public License v3.0
0 stars 0 forks source link

Fix endpoint schema #20

Closed AdamVig closed 8 years ago

AdamVig commented 8 years ago

A faulty conditional was causing endpoints that return objects to be sent without the {data: ...} wrapper that the app expects. The improved conditional allows endpoints to either return an object, for example a hash with expiration like {expiration: [date], data: 52} or a raw data point like 52.