atk4 / api

Implementation of RestAPI for Agile Data
https://agiletoolkit.org/
14 stars 12 forks source link

GET by id now also goes through exportModel() #15

Closed PhilippGrashoff closed 5 years ago

PhilippGrashoff commented 5 years ago

API has its own function to export a model when using get: exportModel(); I find this function very sensible, e.g. to alter time fields (currently exported as Datetime object). However, the current rest implementation bypassed this function when only a single record identified by ID was requested. This PR unifies GET handling in API: they all run through exportModel().

PhilippGrashoff commented 5 years ago

Didnt think far enough, exportModel() will return an array, crap if single model is requested.