Invalid params
This commit is contained in:
parent
1f2cd40237
commit
95232189cd
|
@ -279,8 +279,13 @@ clients_show() ->
|
||||||
KeySpecs = [{'client_id', [{typecast, fun(ClientId) -> list_to_binary(ClientId) end}]}],
|
KeySpecs = [{'client_id', [{typecast, fun(ClientId) -> list_to_binary(ClientId) end}]}],
|
||||||
FlagSpecs = [],
|
FlagSpecs = [],
|
||||||
Callback =
|
Callback =
|
||||||
fun (_, [{_, ClientId}], _) ->
|
fun (_, Params, _) ->
|
||||||
[clique_status:table(if_client(ClientId, fun print/1))]
|
case get_value('client_id', Params) of
|
||||||
|
undefined ->
|
||||||
|
[clique_status:text(io_lib:format("Invalid params client_id is undefined~n", []))];
|
||||||
|
ClientId ->
|
||||||
|
[clique_status:table(if_client(ClientId, fun print/1))]
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
clique:register_command(Cmd, KeySpecs, FlagSpecs, Callback).
|
clique:register_command(Cmd, KeySpecs, FlagSpecs, Callback).
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue