mirror of https://github.com/bjdgyc/anylink.git
修复在线用户问题
This commit is contained in:
parent
57e2f45398
commit
00bbbf414d
|
@ -180,7 +180,15 @@ func userOtpQr(uid int, b64 bool) (string, error) {
|
|||
|
||||
// 在线用户
|
||||
func UserOnline(w http.ResponseWriter, r *http.Request) {
|
||||
datas := sessdata.OnlineSess()
|
||||
_ = r.ParseForm()
|
||||
search_cate := r.FormValue("search_cate")
|
||||
search_text := r.FormValue("search_text")
|
||||
show_sleeper := r.FormValue("show_sleeper")
|
||||
showSleeper, _ := strconv.ParseBool(show_sleeper)
|
||||
// one_offline := r.FormValue("one_offline")
|
||||
|
||||
// datas := sessdata.OnlineSess()
|
||||
datas := sessdata.GetOnlineSess(search_cate, search_text, showSleeper)
|
||||
|
||||
data := map[string]interface{}{
|
||||
"count": len(datas),
|
||||
|
|
|
@ -88,7 +88,7 @@ func LinkAuth(w http.ResponseWriter, r *http.Request) {
|
|||
// TODO 用户密码校验
|
||||
err = dbdata.CheckUser(cr.Auth.Username, cr.Auth.Password, cr.GroupSelect)
|
||||
if err != nil {
|
||||
base.Warn(err)
|
||||
base.Warn(err, r.RemoteAddr)
|
||||
ua.Info = err.Error()
|
||||
ua.Status = dbdata.UserAuthFail
|
||||
dbdata.UserActLogIns.Add(ua, userAgent)
|
||||
|
|
Loading…
Reference in New Issue