Add populate league function in api/leagues