const db = require('./db')
const pgp = require('pg-promise')()

const userQueries = {
  createUser: (name, email, password) => {
    return db.one(`
      INSERT INTO users (name, email, password)
      VALUES ($1, $2, $3)
      RETURNING id`,
      [name, email, password])
    .then(pgp.end())
    .catch((error) => {
      console.log("\nError in user-queries.js createUser\n")
      throw error
    })
  }
}

module.exports = userQueries

@@ -57,16 +57,83 @@
 se')()%0A%0A
+// NOTE: remove pgp.end and .catch once they are handled elsewhere%0A
 const us
@@ -207,11 +207,8 @@
  db.
-one
 (%60%0A 

Add note for refactoring once other parts are built