Better error handling for incrementing watched count on Anime list
This commit is contained in:
parent
3d51a81347
commit
6f7d94641e
@ -39,7 +39,16 @@
|
||||
data,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
success: () => {
|
||||
success: (res) => {
|
||||
const resData = JSON.parse(res);
|
||||
|
||||
if (resData.errors) {
|
||||
_.hide(_.$('#loading-shadow')[ 0 ]);
|
||||
_.showMessage('error', `Failed to update ${title}. `);
|
||||
_.scrollToTop();
|
||||
return;
|
||||
}
|
||||
|
||||
if (data.data.status === 'completed') {
|
||||
_.hide(parentSel);
|
||||
}
|
||||
|
@ -273,7 +273,7 @@ var AnimeClient = (function(w) {
|
||||
responseText = request.responseText;
|
||||
}
|
||||
|
||||
if (request.status > 400) {
|
||||
if (request.status > 299) {
|
||||
config.error.call(null, request.status, responseText, request.response);
|
||||
} else {
|
||||
config.success.call(null, responseText, request.status);
|
||||
|
@ -4,10 +4,10 @@
|
||||
"watch": "watch 'npm run build' --filter=./cssfilter.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"cssnano": "^3.10.0",
|
||||
"cssnano": "^4.0.5",
|
||||
"postcss-cachify": "^1.3.1",
|
||||
"postcss-cssnext": "^3.0.0",
|
||||
"postcss-import": "^10.0.0",
|
||||
"postcss-import": "^12.0.0",
|
||||
"watch": "^1.0.2"
|
||||
}
|
||||
}
|
||||
|
1177
public/yarn.lock
1177
public/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user