close_stream接口结果返回字段改成result

This commit is contained in:
xiongziliang 2019-11-18 16:28:56 +08:00
parent f628985037
commit bcc5c839a5

View File

@ -437,10 +437,10 @@ void installWebApi() {
allArgs["stream"]); allArgs["stream"]);
if(src){ if(src){
bool flag = src->close(allArgs["force"].as<bool>()); bool flag = src->close(allArgs["force"].as<bool>());
val["code"] = flag ? 0 : -1; val["result"] = flag ? 0 : -1;
val["msg"] = flag ? "success" : "close failed"; val["msg"] = flag ? "success" : "close failed";
}else{ }else{
val["code"] = -2; val["result"] = -2;
val["msg"] = "can not find the stream"; val["msg"] = "can not find the stream";
} }
}); });