Commit 93ab6abc authored by 何娜's avatar 何娜

修复返回状态码

parent 43027016
Pipeline #21293 passed with stage
in 5 seconds
......@@ -23,6 +23,7 @@ class StorageService extends Service {
dataType: 'json',
...opts,
};
ctx.logger.info(url+'----'+opts)
return ctx.curl(url, opts);
}
......@@ -36,7 +37,7 @@ class StorageService extends Service {
});
ctx.logger.info(`【Storage】write url:${writeUrl} params`, { ...data, serviceType: writeType }, 'result:', result.data);
if (result.data.code !== '0') {
if (!(result.data.code !== '0' || result.data.code !== 0)) {
throw new Error('存储数据出错');
}
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment