(pool, candidate)
| 203 | * @returns {Promise} |
| 204 | */ |
| 205 | const getVoteCount = async (pool, candidate) => { |
| 206 | return await pool('votes').count('vote_id').where('candidate', candidate); |
| 207 | }; |
| 208 | |
| 209 | const httpGet = async (req, res) => { |
| 210 | pool = pool || (await createPoolAndEnsureSchema()); |