| 187 | * @returns {Promise} |
| 188 | */ |
| 189 | const getVotes = async pool => { |
| 190 | return await pool |
| 191 | .select('candidate', 'time_cast') |
| 192 | .from('votes') |
| 193 | .orderBy('time_cast', 'desc') |
| 194 | .limit(5); |
| 195 | }; |
| 196 | |
| 197 | /** |
| 198 | * Retrieve the total count of records for a given candidate |