|
@@ -9,6 +9,7 @@ local it = require "util.iterators";
|
9
|
9
|
local json = require "util.json";
|
10
|
10
|
local iterators = require "util.iterators";
|
11
|
11
|
local array = require"util.array";
|
|
12
|
+local wrap_async_run = module:require "util".wrap_async_run;
|
12
|
13
|
|
13
|
14
|
local tostring = tostring;
|
14
|
15
|
local neturl = require "net.url";
|
|
@@ -192,9 +193,9 @@ function module.load()
|
192
|
193
|
module:provides("http", {
|
193
|
194
|
default_path = "/";
|
194
|
195
|
route = {
|
195
|
|
- ["GET room-size"] = handle_get_room_size;
|
|
196
|
+ ["GET room-size"] = function (event) return wrap_async_run(event,handle_get_room_size) end;
|
196
|
197
|
["GET sessions"] = function () return tostring(it.count(it.keys(prosody.full_sessions))); end;
|
197
|
|
- ["GET room"] = handle_get_room;
|
|
198
|
+ ["GET room"] = function (event) return wrap_async_run(event,handle_get_room) end;
|
198
|
199
|
};
|
199
|
200
|
});
|
200
|
201
|
end
|