add log to return object in api-server.js