Show mail domain change progress
This commit is contained in:
@@ -7,7 +7,7 @@ function create() {
|
||||
const accessToken = localStorage.token;
|
||||
|
||||
return {
|
||||
async wait(id) {
|
||||
async wait(id, progressHandler = function () {}) {
|
||||
while(true) {
|
||||
let result;
|
||||
try {
|
||||
@@ -16,8 +16,11 @@ function create() {
|
||||
return [e];
|
||||
}
|
||||
|
||||
console.log(result.body)
|
||||
if (!result.body.active) return [result.body.error, result.body.result];
|
||||
|
||||
progressHandler(result.body);
|
||||
|
||||
await sleep(2000);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user