Last week, we made progress with linking our initial React UI pages and figuring out how we're going to build our JS API.
This week, we aim to implement most of our API calls and further work on the React UI pages, with options to manage individual bots and edit them.
<aside> 🎯 **What are we looking to achieve?
2. Rework the upload page file input The input should only accept certain files, make relevant calls to our business logic API, and have some UX features like a progress bar to give feedback to the user.
3. Add pages to manage individual bots We need to have the ability to remap bots to different numbers, and delete them entirely.
</aside>
Based on the functionality we wanted our application to have, we knew what core API calls we would need. We've outlined these previously when defining the interface between our frontend and business logic.
For recap, this included methods to:
We initially had a lot of trouble getting our http requests to Twilio to work - we kept getting different status code errors.
url=
'<https://serverless-upload.twilio.com/v1/Services/${service_uid}/Assets/${asset_uid}/Versions>'
console.log(url)
var contentType = "application/json"
var contentOpts = {
filename: "mapping.json",
contentType: contentType
}
form = new FormData();
form.append('Path', "mapping.json");
form.append('Visibility', "private");
form.append('Content', JSON.stringify(mapping), contentOpts);
await axios.post(url, form, {
auth: {
'user': client.accountSid,
'pass': client.password
}
});