West Ham United besegrade Stoke City 1-0 i den 18:e omgången av Championship, med Konstantinos Mavropanos som målskytt.