text: const functions = require('firebase-functions')
  const admin = require('firebase-admin')
  admin.initializeApp()
  
  exports.addAdminRole = functions.https.onCall((data, context) => {
    if (data.email && data.email.endsWith('@kryptovote.admin.com')) {
      return admin
        .auth()
        .getUserByEmail(data.email)
        .then((user) => {
          return admin.auth().setCustomUserClaims(user.uid, { admin: true })
        })
        .then(() => {
          return {
            message: `Success ${data.email} has been made an admin`
          }
        })
        .catch((error) => {
          return error
        })
    }
  })
  