liuxiaolong
2020-09-01 ca10e9d776509f54cb0251b7eae44cee74d94b2c
controllers/user.go
@@ -94,6 +94,17 @@
// @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
         uc.DeleteByCid(cid)
      }()
   }
   resp := code.Code{}
   resp.Success = true
   resp.Status = http.StatusOK