Add Unlink API.

This commit is contained in:
Yang Luo
2021-04-18 23:14:46 +08:00
parent 2934d6bdeb
commit 6774b0379c
8 changed files with 171 additions and 28 deletions

View File

@ -195,7 +195,8 @@ func (c *ApiController) Login() {
return
}
isLinked := object.LinkUserAccount(userId, provider.Type, userInfo.Username)
user := object.GetUser(userId)
isLinked := object.LinkUserAccount(user, provider.Type, userInfo.Username)
if isLinked {
resp = &Response{Status: "ok", Msg: "", Data: isLinked}
} else {