Skip to content

Instantly share code, notes, and snippets.

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. :(');
await user.setMentorStatus(true);
console.log( + ' is now a mentor. :)');
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.