This commit is contained in:
Alex Yatskov 2016-10-15 17:34:29 -07:00
parent 6898de4ca6
commit ef25ad144e

View File

@ -81,7 +81,7 @@ class AnkiWeb {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
$.get('https://ankiweb.net/edit/', (data, status) => { $.get('https://ankiweb.net/edit/', (data, status) => {
if (status !== 'success') { if (status !== 'success') {
reject('scrape failed'); reject('failed to execute scrape request');
return; return;
} }
@ -119,10 +119,10 @@ class AnkiWeb {
if (data.includes('class="mitem"')) { if (data.includes('class="mitem"')) {
resolve(); resolve();
} else { } else {
reject('authentication failed'); reject('failed to authenticate');
} }
} else { } else {
reject('login failed'); reject('failed to execute login request');
} }
}); });
}); });
@ -134,7 +134,7 @@ class AnkiWeb {
if (status === 'success') { if (status === 'success') {
resolve(); resolve();
} else { } else {
reject('logout failed'); reject('failed to execute logout request');
} }
}); });
}); });