Update controllers.js

Changed controller to use API service