Update api-factory.js