Mercurial > prosody-modules
comparison mod_http_admin_api/mod_http_admin_api.lua @ 4365:f975a4d31f35
mod_http_admin_api: make the api a bit less untested
(read: fix bugs)
author | Jonas Schäfer <jonas@wielicki.name> |
---|---|
date | Thu, 21 Jan 2021 16:13:29 +0100 |
parents | 49cf9d188b26 |
children | 83370df0ce4a |
comparison
equal
deleted
inserted
replaced
4364:49cf9d188b26 | 4365:f975a4d31f35 |
---|---|
268 time = os.time(); | 268 time = os.time(); |
269 }; | 269 }; |
270 -- Online sessions | 270 -- Online sessions |
271 do | 271 do |
272 local user_sessions = hosts[module.host].sessions[username]; | 272 local user_sessions = hosts[module.host].sessions[username]; |
273 if user_sessions then | |
274 user_sessions = user_sessions.sessions | |
275 end | |
273 local sessions = {}; | 276 local sessions = {}; |
274 if user_sessions then | 277 if user_sessions then |
275 for _, session in pairs(user_sessions) do | 278 for _, session in pairs(user_sessions) do |
276 table.insert(sessions, get_session_debug_info(session)); | 279 table.insert(sessions, get_session_debug_info(session)); |
277 end | 280 end |