async function deauthorizeAthlete(athlete) {
  let athleteDoc = false;
  if (athlete instanceof Athlete) {
    athleteDoc = athlete;
  } else {
    athleteDoc = await Athlete.findById(athlete);
  }

  if (!athleteDoc) {
    return;
  }

  await athleteDoc.updateOne({ status: 'deauthorized' });
}
/**
 * Set athlete status to 'deauthorized'
 *
 * @param {Integer|Athlete} athlete Athlete ID or document
 */
Set athlete status to 'deauthorized'
@param {Integer|Athlete} athlete Athlete ID or document
Set athlete status to ' deauthorized ' @param { Integer|Athlete } athlete Athlete ID or document
async function deauthorizeAthlete(athlete) {
  let athleteDoc = false;
  if (athlete instanceof Athlete) {
    athleteDoc = athlete;
  } else {
    athleteDoc = await Athlete.findById(athlete);
  }
  if (!athleteDoc) {
    return;
  }
  await athleteDoc.updateOne({ status: 'deauthorized' });
}
async function deauthorizeAthlete ( athlete ) { let athleteDoc = false ; if ( athlete instanceof Athlete ) { athleteDoc = athlete ; } else { athleteDoc = await Athlete . findById ( athlete ) ; } if ( ! athleteDoc ) { return ; } await athleteDoc . updateOne ( { status : 'deauthorized' } ) ; }
Set athlete status to 'deauthorized'
 @param {Integer|Athlete} athlete Athlete ID or document
Set athlete status to ' deauthorized ' @param { Integer|Athlete } athlete Athlete ID or document