2xx的http statusCode都应该被处理

responses中成功的状态码不仅仅只有200,可能会是其它的,比如201
This commit is contained in:
yuri 2018-01-24 10:00:05 +08:00 committed by GitHub
parent 7333270a2d
commit d47099985b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -195,7 +195,7 @@ function improtData(importDataModule) {
return res_body;
}
_.each(api, (res, code) => {
if (code == 200) {
if (/^2/.test(code)) {
if (res && typeof res === 'object') {
if (res.schema) {