message: Improved code consistency between 2fa server methods
diff: @@ -44,7 +44,6 @@ async function verify (req, res) {
  res.json({ authentication: { token, bid: basket.id, umail: user.email } })
  } catch (error) {
  - logger.warn('Failed to verify token identity')
  res.status(401).send()
  }
  }
  @@ -55,10 +54,10 @@ async function verify (req, res) {
  * When 2FA isnt setup, the result will include data requried to start the setup.
  */
  async function status (req, res) {
  + try {
  const data = insecurity.authenticatedUsers.from(req)
  if (!data) {
  - res.status(401).send('You need to be logged in to see this.')
  - return
  + throw new Error('You need to be logged in to see this')
  }
  const { data: user } = data
  @@ -79,6 +78,9 @@ async function status (req, res) {
  setup: true
  })
  }
  + } catch (error) {
  + res.status(401).send()
  + }
  }
  /**
  