Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
'use strict';
const { User } = require('./models');
/* eslint-disable no-console, no-await-in-loop */
async function main() {
for (const email of process.argv.slice(2)) {
const user = await User.getByEmail(email);
if (!user) {
console.error(email + ' is not a registered email. :(');
continue;
}
await user.setMentorStatus(true);
console.log(user.name + ' is now a mentor. :)');
}
}
main();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.