John Cena competed in an Elimination Tag Team match against Nexus on SummerSlam 2010. The Cenation Leader bagged the win for team WWE, but that was not the original plan, as Wade Barrett and Team Nexus were supposed to go over at the event.
John Cena teamed up with top superstars such as John Morrison, R-Truth, Bret Hart, Chris Jericho, Edge, and Daniel Bryan for the match. On the other hand, Team Nexus was led by Wade Barrett, and joining him were Darren Young, Michael Tarver, Ryback, David Otunga, Heath Slater, and Justin Gabriel. The final three were Barrett, Gabriel, and Cena. The latter managed to eliminate both members of Nexus and get the victory.
In an interview with Inside the Ropes in 2017, Wade Barrett revealed that the entire Nexus walked into SummerSlam 2010 thinking that they would win, noting that they couldn't lose their hype and it was the best time to prove their credibility.
On the actual Premium Live Event, Arn Anderson informed them before the match that John would go over instead. The current SmackDown star did not initially believe this, but when he knew Arn was serious, he looked for Vince McMahon.
After hours of looking, they found Vince. Mr. McMahon told them John Cena was winning the SummerSlam 2010 match, canceling Barret's win to give the feud a happy ending and send kids home happy.
Barrett couldn't recover from the loss and never found the same level of dominance after the feud. Although he became the Intercontinental Champion at some point, it wasn't that notable. He hasn't wrestled since 2016 and works in WWE as a commentator at SmackDown.
Did John Cena genuinely decide to go over WWE SummerSlam 2010?

Although the former Nexus member claimed that Mr. McMahon was the one who decided to change the finish, Edge and Chris Jericho thought otherwise.
On a previous episode of Talk is Jericho, the former WWE Undisputed Champion shared that John wanted to get DDT'd by Wade on the floor, kick out, and eliminate Nexus. Both of them opposed the idea, but the Peacemaker actor persisted. In the end, the latter expressed he should have listened.
What did John Cena say about his WWE SummerSlam 2010 victory?
A fan asked Cena about the booking of the 2010 match at the veteran's "An Evening with John Cena" Q&A session. Cena answered that he doesn't pick the story and only does what he's told, but he does have an input on what goes on in the story.
A win for the Nexus would elevate their status as the top heels in the company. It would have been interesting to see what would have happened to the group and Barrett if the original script was followed.