evoluteur / evolutility-server-node

Model-driven REST APIs for CRUD and more, written in Javascript, using Node.js, Express, and PostgreSQL.
GNU Affero General Public License v3.0
111 stars 33 forks source link

UI formatting should be left to the UI #18

Closed david-pfx closed 5 years ago

david-pfx commented 5 years ago

The server sends dates as an ISO string and leaves it to the client to do the formatting. This is right.

However, the server formats currency amounts and sends them through as a formatted string. IMO the server should send (say) a wine price as a decimal number and leave it to the UI to format it as currency.

At least whatever it does should be consistent.

evoluteur commented 5 years ago

Done! SQL cast: column::numeric::float8 https://github.com/evoluteur/evolutility-server-node/commit/0f75db3c1d0997763ff63cfd306e49ba5ad6a09b