Adding endpoint and logic to retrieve the results of the election