(pool, vote)
| 172 | * @returns {Promise} |
| 173 | */ |
| 174 | const insertVote = async (pool, vote) => { |
| 175 | try { |
| 176 | return await pool('votes').insert(vote); |
| 177 | } catch (err) { |
| 178 | throw Error(err); |
| 179 | } |
| 180 | }; |
| 181 | // [END cloud_sql_postgres_knex_connection] |
| 182 | |
| 183 | /** |