server/api/integrations/integrations.controller.js
/**
 * Delete the SMS integration from the user.
 *
 * @param {Koa context} ctx
 */
Delete the SMS integration from the user.
@param {Koa context} ctx
Delete the SMS integration from the user . @param { Koa context } ctx
async function disableSMS (ctx) {
  ctx.state.user.integrations.sms = {
    verified: false
  };
  ctx.state.user.setup.integrations = true;
  try {
    await ctx.state.user.save();
  } catch (e) {
    logger.error(`Failed to disable SMS for ${ctx.state.user.rcs_id}: ${e}`);
    return ctx.badRequest('Failed to disable SMS integration.');
  }
  logger.info(`Disabled SMS integration for ${ctx.state.user.rcs_id}.`);
  ctx.ok({ updatedUser: ctx.state.user });
}
async function disableSMS ( ctx ) { ctx . state . user . integrations . sms = { verified : false } ; ctx . state . user . setup . integrations = true ; try { await ctx . state . user . save ( ) ; } catch ( e ) { logger . error ( ` ${ ctx . state . user . rcs_id } ${ e } ` ) ; return ctx . badRequest ( 'Failed to disable SMS integration.' ) ; } logger . info ( ` ${ ctx . state . user . rcs_id } ` ) ; ctx . ok ( { updatedUser : ctx . state . user } ) ; }
Delete the SMS integration from the user.
Delete the SMS integration from the user .