Josh Magennis grabbed the winner as City won 2-1 away to Barnsley to climb the table