|
|
@@ -169,6 +169,10 @@ end, -100);
|
|
169
|
169
|
-- @param event the http event, holds the request query
|
|
170
|
170
|
-- @return GET response, containing a json with response details
|
|
171
|
171
|
function handle_create_poltergeist (event)
|
|
|
172
|
+ if (not event.request.url.query) then
|
|
|
173
|
+ return 400;
|
|
|
174
|
+ end
|
|
|
175
|
+
|
|
172
|
176
|
local params = parse(event.request.url.query);
|
|
173
|
177
|
local user_id = params["user"];
|
|
174
|
178
|
local room_name = params["room"];
|
|
|
@@ -194,6 +198,10 @@ end
|
|
194
|
198
|
-- @param event the http event, holds the request query
|
|
195
|
199
|
-- @return GET response, containing a json with response details
|
|
196
|
200
|
function handle_update_poltergeist (event)
|
|
|
201
|
+ if (not event.request.url.query) then
|
|
|
202
|
+ return 400;
|
|
|
203
|
+ end
|
|
|
204
|
+
|
|
197
|
205
|
local params = parse(event.request.url.query);
|
|
198
|
206
|
local user_id = params["user"];
|
|
199
|
207
|
local room_name = params["room"];
|