Skip to content

Commit

Permalink
[fix]解除绑定bug
Browse files Browse the repository at this point in the history
  • Loading branch information
wutongci committed May 13, 2019
1 parent 9733fc1 commit 7b764d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 0 additions & 2 deletions pkg/controllers/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ func (self *BaseController) Resp(code int, msg string, data ...interface{}) {
}

func (self *BaseController) Fail(errs *components.ControllerError, moreErrInfo ...string) {
beego.Debug(CurrentLang,errs.Langkey)
beego.Debug(i18n.Tr(CurrentLang, errs.Langkey))
errs.Message = i18n.Tr(CurrentLang, errs.Langkey)
self.Data["json"] = errs
errs.Moreinfo = ""
Expand Down
9 changes: 3 additions & 6 deletions pkg/dao/user_oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,9 @@ func (dao *UserOAuthDao) Create(userOAuth models.UserOAuth) (int64, error) {

func (dao *UserOAuthDao) DeleteByUseridAndFrom(from int,user_id int) error {
o := GetOrmer()
UserOAuth := &models.UserOAuth{User_id: user_id,From:from}
if o.Read(UserOAuth) == nil {
_, err := o.Delete(UserOAuth)
if err != nil {
return err
}
_, err := o.QueryTable("user_oauth").Filter("from", from).Filter("user_id",user_id).Delete()
if err != nil {
return err
}
return nil
}
Expand Down

0 comments on commit 7b764d9

Please sign in to comment.