Something went wrong. Try again.
An attempt to showcase digitally, what's going-on at Inovus Labs. Something similar to Discord Rich Presence or Tinkerspace Digital live.inovuslabs.org
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031const db = require('../config/connection')const collections = require('../config/collections')
module.exports = {
addUserInfo: (userDetails) => { return new Promise((resolve, reject) => { db.collection(collections.LIVE_COLLECTIONS).insertOne(userDetails).then((response) => { resolve(response) }) }) },
getAllUsers: () =>{ return new Promise((resolve, reject)=>{ db.collection(collections.LIVE_COLLECTIONS).find().toArray().then((userData)=>{ resolve(userData) }) }) },
dropCollection: () =>{ return new Promise((resolve, reject)=>{ db.collection(collections.LIVE_COLLECTIONS).drop().then((response)=>{ resolve(response) }) }) }
}