I don't think you can repair it, or that it's even up to you to repair anything. All you can do is express your feelings about it and step out of the way if you feel it is detrimental for you to be around them.
You have nothing to lose by telling your friend, "I would like our friendship to continue, but I feel I need to limit my contact with your boyfriend. I don't think it's healthy for me to be around him, and in fact I wonder the same for you. I hope you still want to be my friend, but if you do, please respect my wish to not hang out with him. If you can't do that, then I wish you all the best."
The world opens up... when you do.
Oh, oh, can't you see? Love is the drug for me. ~Bryan Ferry
"Love is that condition in which another person's happiness is essential to your own." ~Robert Heinlein