export callbacks, wrote failing test

This commit is contained in:
eric-burel 2018-11-05 13:50:07 +01:00
parent db3f6f95f3
commit c83c27a320

View file

@ -27,7 +27,7 @@
// }
// addCallback("users.new.sync", usersNewAdminUserCreationNotification);
function usersMakeAdmin (user) {
export function usersMakeAdmin (user) {
// if this is not a dummy account, and is the first user ever, make them an admin
// TODO: should use await Connectors.count() instead, but cannot await inside Accounts.onCreateUser. Fix later.
const realUsersCount = Users.find({'isDummy': {$ne: true}}).count();