Skip to content

Commit

Permalink
improve output
Browse files Browse the repository at this point in the history
GuyHarwood committed Nov 28, 2017
1 parent 9bb5e92 commit 2962a6b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions deploy/jobs/purge-pins.js
Original file line number Diff line number Diff line change
@@ -2,18 +2,18 @@

try {
print('erasing pupil pins...')
db.pupils.updateMany(
printjson(db.pupils.updateMany(
{ pin: {$ne: null} },
{ $set: { pin: null, pinExpiresAt: null } }
)
printjson(db.runCommand('getlasterror'))
print('erasing school pins...')
db.schools.updateMany(
))

print('erasing school pins...')
printjson(db.schools.updateMany(
{ schoolPin: {$ne: null} },
{ $set: { schoolPin: null, pinExpiresAt: null } }
)
printjson(db.runCommand('getlasterror'))

))
} catch (e) {
print('ERROR...')
print(e)
throw e
}

0 comments on commit 2962a6b

Please sign in to comment.