Handles the async wrapping of the mod_muc_size functions
fixes handling of keyserver ASAP validation of tokens wraps room and room-size APIs
This commit is contained in:
parent
22e9dc9893
commit
b6efdb533d
|
@ -9,6 +9,7 @@ local it = require "util.iterators";
|
||||||
local json = require "util.json";
|
local json = require "util.json";
|
||||||
local iterators = require "util.iterators";
|
local iterators = require "util.iterators";
|
||||||
local array = require"util.array";
|
local array = require"util.array";
|
||||||
|
local wrap_async_run = module:require "util".wrap_async_run;
|
||||||
|
|
||||||
local tostring = tostring;
|
local tostring = tostring;
|
||||||
local neturl = require "net.url";
|
local neturl = require "net.url";
|
||||||
|
@ -192,9 +193,9 @@ function module.load()
|
||||||
module:provides("http", {
|
module:provides("http", {
|
||||||
default_path = "/";
|
default_path = "/";
|
||||||
route = {
|
route = {
|
||||||
["GET room-size"] = handle_get_room_size;
|
["GET room-size"] = function (event) return wrap_async_run(event,handle_get_room_size) end;
|
||||||
["GET sessions"] = function () return tostring(it.count(it.keys(prosody.full_sessions))); end;
|
["GET sessions"] = function () return tostring(it.count(it.keys(prosody.full_sessions))); end;
|
||||||
["GET room"] = handle_get_room;
|
["GET room"] = function (event) return wrap_async_run(event,handle_get_room) end;
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue