Refactor api structure in javascript
Problem to solve
In jh/app/assets/javascripts/api.js
We should follow the pattern as EE did in ee/app/assets/javascripts/api.js
: wrap the url and method in an Api object, and exporting it with default export.
Proposal
refactor api structure in jh/app/assets/javascripts/api.js