const Permission = require('./permissionModel') const chalk = require('chalk') const runSeeder = async () => { const permissions = [] await Permission.deleteMany({}) console.log(chalk.red('Deleted all permission records.')) await Permission.insertMany(permissions, null) console.log( chalk.green.bold( `PERMISSION: Created ${permissions.length} permission(s)` ) ) } module.exports = { runSeeder }