Returns error when there is no query, but params expected.
This commit is contained in:
parent
0cffbdb967
commit
64bb5563bc
|
@ -169,6 +169,10 @@ end, -100);
|
||||||
-- @param event the http event, holds the request query
|
-- @param event the http event, holds the request query
|
||||||
-- @return GET response, containing a json with response details
|
-- @return GET response, containing a json with response details
|
||||||
function handle_create_poltergeist (event)
|
function handle_create_poltergeist (event)
|
||||||
|
if (not event.request.url.query) then
|
||||||
|
return 400;
|
||||||
|
end
|
||||||
|
|
||||||
local params = parse(event.request.url.query);
|
local params = parse(event.request.url.query);
|
||||||
local user_id = params["user"];
|
local user_id = params["user"];
|
||||||
local room_name = params["room"];
|
local room_name = params["room"];
|
||||||
|
@ -194,6 +198,10 @@ end
|
||||||
-- @param event the http event, holds the request query
|
-- @param event the http event, holds the request query
|
||||||
-- @return GET response, containing a json with response details
|
-- @return GET response, containing a json with response details
|
||||||
function handle_update_poltergeist (event)
|
function handle_update_poltergeist (event)
|
||||||
|
if (not event.request.url.query) then
|
||||||
|
return 400;
|
||||||
|
end
|
||||||
|
|
||||||
local params = parse(event.request.url.query);
|
local params = parse(event.request.url.query);
|
||||||
local user_id = params["user"];
|
local user_id = params["user"];
|
||||||
local room_name = params["room"];
|
local room_name = params["room"];
|
||||||
|
|
|
@ -72,6 +72,10 @@ end
|
||||||
-- @return GET response, containing a json with participants count,
|
-- @return GET response, containing a json with participants count,
|
||||||
-- tha value is without counting the focus.
|
-- tha value is without counting the focus.
|
||||||
function handle_get_room_size(event)
|
function handle_get_room_size(event)
|
||||||
|
if (not event.request.url.query) then
|
||||||
|
return 400;
|
||||||
|
end
|
||||||
|
|
||||||
local params = parse(event.request.url.query);
|
local params = parse(event.request.url.query);
|
||||||
local room_name = params["room"];
|
local room_name = params["room"];
|
||||||
local domain_name = params["domain"];
|
local domain_name = params["domain"];
|
||||||
|
@ -121,6 +125,10 @@ end
|
||||||
-- @param event the http event, holds the request query
|
-- @param event the http event, holds the request query
|
||||||
-- @return GET response, containing a json with participants details
|
-- @return GET response, containing a json with participants details
|
||||||
function handle_get_room (event)
|
function handle_get_room (event)
|
||||||
|
if (not event.request.url.query) then
|
||||||
|
return 400;
|
||||||
|
end
|
||||||
|
|
||||||
local params = parse(event.request.url.query);
|
local params = parse(event.request.url.query);
|
||||||
local room_name = params["room"];
|
local room_name = params["room"];
|
||||||
local domain_name = params["domain"];
|
local domain_name = params["domain"];
|
||||||
|
|
Loading…
Reference in New Issue