mirror of
https://github.com/maunium/stickerpicker.git
synced 2025-08-28 02:41:48 +02:00
Improve comments
This commit is contained in:
@@ -35,14 +35,14 @@ export function sendGIF(url){
|
|||||||
if (xhr.readyState === 4) {
|
if (xhr.readyState === 4) {
|
||||||
if (xhr.status === 200) {
|
if (xhr.status === 200) {
|
||||||
const responseData = xhr.responseText;
|
const responseData = xhr.responseText;
|
||||||
// Call function A with the response data
|
// Call uploadFile with response data
|
||||||
api.uploadFile(responseData)
|
api.uploadFile(responseData)
|
||||||
.then(result => {
|
.then(result => {
|
||||||
console.log("Here's the result:"+result);
|
console.log("Here's the result:"+result);
|
||||||
resolve(result); // Resolve the outer promise with the result from A
|
resolve(result);
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
reject(error); // Reject the outer promise if function A fails
|
reject(error);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
reject(new Error('Failed to fetch data')); // Reject the outer promise if fetching data fails
|
reject(new Error('Failed to fetch data')); // Reject the outer promise if fetching data fails
|
||||||
|
Reference in New Issue
Block a user