From 50c3437ec2e1874df6468bb83a9d5acf40482e6a Mon Sep 17 00:00:00 2001 From: liuxiaolong <liuxiaolong@aiotlink.com> Date: 星期二, 08 九月 2020 11:08:29 +0800 Subject: [PATCH] rm push msg title and nightMsg for manger --- controllers/user.go | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/controllers/user.go b/controllers/user.go index 927a38f..ec7df28 100644 --- a/controllers/user.go +++ b/controllers/user.go @@ -94,6 +94,18 @@ // @Success 200 {string} logout success // @router /logout [get] func (u *UserController) Logout() { + cid := u.GetString("cid") //unipush clientid + fmt.Println("clientId:", cid) + + if cid != "" { + go func() { + unbindB, unE := service.UnbindAlias(cid) + fmt.Println("unbind result:", unbindB, "err:", unE) + var uc models.UserClient + i, e := uc.DeleteByCid(cid) + fmt.Println("deleteByCid affected:", i, "err:", e) + }() + } resp := code.Code{} resp.Success = true resp.Status = http.StatusOK -- Gitblit v1.8.0