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

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

module.exports = {
  createData,
}
