mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-29 22:55:52 +08:00
兼容拼写错误
This commit is contained in:
parent
0522ad2677
commit
9665d557ae
@ -72,6 +72,8 @@ typedef map<string,variant,StrCaseCompare> ApiArgsType;
|
|||||||
invoker("200 OK", headerOut, val.toStyledString()); \
|
invoker("200 OK", headerOut, val.toStyledString()); \
|
||||||
});
|
});
|
||||||
|
|
||||||
|
#define API_ARGS_VALUE sender,headerIn,headerOut,allArgs,val,invoker
|
||||||
|
|
||||||
#define API_REGIST_INVOKER(field, name, ...) \
|
#define API_REGIST_INVOKER(field, name, ...) \
|
||||||
s_map_api.emplace("/index/"#field"/"#name,[](API_ARGS,const HttpSession::HttpResponseInvoker &invoker) __VA_ARGS__);
|
s_map_api.emplace("/index/"#field"/"#name,[](API_ARGS,const HttpSession::HttpResponseInvoker &invoker) __VA_ARGS__);
|
||||||
|
|
||||||
@ -602,13 +604,23 @@ void installWebApi() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
//关闭拉流代理
|
|
||||||
//测试url http://127.0.0.1/index/api/delFFmepgSource?key=key
|
static auto api_delFFmpegSource = [](API_ARGS,const HttpSession::HttpResponseInvoker &invoker){
|
||||||
API_REGIST(api,delFFmpegSource,{
|
|
||||||
CHECK_SECRET();
|
CHECK_SECRET();
|
||||||
CHECK_ARGS("key");
|
CHECK_ARGS("key");
|
||||||
lock_guard<decltype(s_ffmpegMapMtx)> lck(s_ffmpegMapMtx);
|
lock_guard<decltype(s_ffmpegMapMtx)> lck(s_ffmpegMapMtx);
|
||||||
val["data"]["flag"] = s_ffmpegMap.erase(allArgs["key"]) == 1;
|
val["data"]["flag"] = s_ffmpegMap.erase(allArgs["key"]) == 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
//关闭拉流代理
|
||||||
|
//测试url http://127.0.0.1/index/api/delFFmepgSource?key=key
|
||||||
|
API_REGIST(api,delFFmpegSource,{
|
||||||
|
api_delFFmpegSource(API_ARGS_VALUE);
|
||||||
|
});
|
||||||
|
|
||||||
|
//此处为了兼容之前的拼写错误
|
||||||
|
API_REGIST(api,delFFmepgSource,{
|
||||||
|
api_delFFmpegSource(API_ARGS_VALUE);
|
||||||
});
|
});
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user