Vote History Data Retrieval Function from DB
Goal
This function should contain a pre-defined SQL query to retrieve the entire vote history from the database. After obtaining this information, the function transforms it into JSON string format.
Arguments
Returns
- JSON formatted data: Contains votes, where each vote includes an ID and the corresponding vote name/topic.
Function Name: get_all_topics
Vote History Data Retrieval Function from DB
Goal
This function should contain a pre-defined SQL query to retrieve the entire vote history from the database. After obtaining this information, the function transforms it into JSON string format.
Arguments
Returns
Function Name:
get_all_topics