Skip to content

Instantly share code, notes, and snippets.

@leny
Last active February 15, 2019 08:32
Show Gist options
  • Select an option

  • Save leny/09573e4a6a69f8bdaf3e67e2e0a46d8b to your computer and use it in GitHub Desktop.

Select an option

Save leny/09573e4a6a69f8bdaf3e67e2e0a46d8b to your computer and use it in GitHub Desktop.
JS Bin// source https://jsbin.com/posekok
import db from "../core/db-manager";
db.collection("users")
.findAll()
.then((allUsers) => Promise.all(
allUsers.map( user => user.update({badge: new Badge("hellow")})
)
)
)
.then((result) => {})
.catch((err) => {})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment