Move `sendData` to backend-utils.js