Этот коммит содержится в:
=Corey Hulen
2015-11-15 18:18:02 -08:00
родитель 48d2f86b90
Коммит 03c6dcbd86
18 изменённых файлов: 419 добавлений и 0 удалений

Просмотреть файл

@@ -332,3 +332,21 @@ func (as SqlOAuthStore) RemoveAuthData(code string) StoreChannel {
return storeChannel
}
func (as SqlOAuthStore) RemoveAuthDataByUserId(userId string) StoreChannel {
storeChannel := make(StoreChannel)
go func() {
result := StoreResult{}
_, err := as.GetMaster().Exec("DELETE FROM OAuthAuthData WHERE UserId = :UserId", map[string]interface{}{"UserId": userId})
if err != nil {
result.Err = model.NewAppError("SqlOAuthStore.RemoveAuthDataByUserId", "We couldn't remove the authorization code", "err="+err.Error())
}
storeChannel <- result
close(storeChannel)
}()
return storeChannel
}