const dbcontroller = require('../db');

const createAlerts = async function (data) {
  try {
    data.inputsAlerts.forEach(async value => {
      await dbcontroller.addAlert(data.id, data.msn, value)
    });
    return { success: true }
  } catch (e) {
    throw new Error(e.message)
  }
}

module.exports = {
  createAlerts,
}
