- IAuther.UnbindAuth的接口改为userID
This commit is contained in:
@@ -35,9 +35,9 @@ func (a *DefAuther) AddAuthBind(authBindEx *auth2.AuthBindEx, userName string) (
|
||||
return err
|
||||
}
|
||||
|
||||
func (a *DefAuther) UnbindAuth(authInfo *auth2.AuthInfo, authType string) (err error) {
|
||||
_, err = dao.DeleteEntityLogically(nil, &model.AuthBind{}, nil, authInfo.GetID(), map[string]interface{}{
|
||||
"UserID": authInfo.GetID(),
|
||||
func (a *DefAuther) UnbindAuth(userID, authType, userName string) (err error) {
|
||||
_, err = dao.DeleteEntityLogically(nil, &model.AuthBind{}, nil, userName, map[string]interface{}{
|
||||
"UserID": userID,
|
||||
"Type": authType,
|
||||
model.FieldDeletedAt: utils.DefaultTimeValue,
|
||||
})
|
||||
|
||||
@@ -83,6 +83,6 @@ func (a *Auther) AddAuthBind(authBindEx *auth2.AuthBindEx, userName string) (err
|
||||
}
|
||||
|
||||
// 此函数为空
|
||||
func (a *Auther) UnbindAuth(authInfo *auth2.AuthInfo, authType string) (err error) {
|
||||
func (a *Auther) UnbindAuth(userID, authType, userName string) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user