implement session stats, fixes last (admin|user) left at won't work for any provider that removed users after logout.

This commit is contained in:
Miroslav Šedivý 2024-09-07 18:55:27 +02:00
parent 356a566bc6
commit 4f401ac2b6
7 changed files with 124 additions and 21 deletions

View file

@ -103,3 +103,8 @@ func (api *ApiManagerCtx) UpdateProfile(w http.ResponseWriter, r *http.Request)
return utils.HttpSuccess(w, true)
}
func (api *ApiManagerCtx) Stats(w http.ResponseWriter, r *http.Request) error {
stats := api.sessions.Stats()
return utils.HttpSuccess(w, stats)
}