West Ham United defeated Stoke City 1-0 in the 18th round of the Championship, with Konstantinos Mavropanos scoring the only goal.