Greenstand / treetracker-admin-api

Legacy API microservice for the admin panel
GNU Affero General Public License v3.0
31 stars 81 forks source link

Planter attributes are snake case instead of camel case #593

Closed nmcharlton closed 3 years ago

nmcharlton commented 3 years ago

The convention with LoopBack is to use snake case for database column names and convert them to camel case for model attributes. If we're executing scripts directly rather than using LoopBack wrappers (such as repository.find()), we need to explicitly convert the column names to the corresponding model attributes as expected by the client.

The result of snake case is that several planter attributes are missing in the UI, including photo and name. Screenshot 2021-10-01 at 21 59 19