async function track(email, query, keyword, frequency) {
  const trackDb = cloudant.db.use(dbName)
  const result = await trackDb.insert({
      email: email,
      query: query,
      keyword: keyword,
      subscribed: true,
      destinationEmail: true,
      frequency: frequency,
      lastUpdate: null
    },
    uuid.v4())

  return result
}
// It'd be better to call this trackEmail or something along those lines, it inserts a new subscriber into the DB
It'd be better to call this trackEmail or something along those lines, it inserts a new subscriber into the DB
It ' d be better to call this trackEmail or something along those lines it inserts a new subscriber into the DB
async function track(email, query, keyword, frequency) {
  const trackDb = cloudant.db.use(dbName)
  const result = await trackDb.insert({
      email: email,
      query: query,
      keyword: keyword,
      subscribed: true,
      destinationEmail: true,
      frequency: frequency,
      lastUpdate: null
    },
    uuid.v4())
  return result
}
async function track ( email , query , keyword , frequency ) { const trackDb = cloudant . db . use ( dbName ) const result = await trackDb . insert ( { email : email , query : query , keyword : keyword , subscribed : true , destinationEmail : true , frequency : frequency , lastUpdate : null } , uuid . v4 ( ) ) return result }
It'd be better to call this trackEmail or something along those lines, it inserts a new subscriber into the DB
It ' d be better to call this trackEmail or something along those lines it inserts a new subscriber into the DB