Swansea City managed to secure a crucial 1-0 victory over Watford, thanks to Myles Peart-Harris' first goal for the club.