修复close stream接口返回code不正确的问题

This commit is contained in:
xiongziliang 2020-10-24 23:31:40 +08:00
parent 8cb564de0a
commit 67e49cb66e

View File

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