mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-04-29 03:55:42 +08:00
15 lines
307 B
CoffeeScript
15 lines
307 B
CoffeeScript
module.exports = (db, callback) ->
|
|
cAccount = db.collection 'accounts'
|
|
|
|
cAccount.update
|
|
'tokens.available':
|
|
$exists: true
|
|
,
|
|
$unset:
|
|
'tokens.$.available': true
|
|
,
|
|
multi: true
|
|
, (err, rows) ->
|
|
console.log "[accounts.tokens.available] update #{rows} rows"
|
|
callback err
|