Novo Nordisk has agreed to sell its blockbuster Wegovy and Ozempic drugs through U.S. telehealth company Hims & Hers’ platform, the Danish drugmaker said on Monday, ending a legal dispute that erupted last month.

The deal marks ‌a turnaround from February, when Novo sued Hims over a $49 compounded alternative to its Wegovy weight-loss pill.

Novo is grappling with telehealth firms offering cheaper compounded copycat versions of its obesity treatments.