const {api} = require('../api/prisma')


function saveLog(args={
    type:'system',
    action:null,
    user:null,
    details:null,
    model:null
}){



if(api.isSet('logs')){
    api.create('logs',{
        data:{
            type:args.type,
            action:args.action,
            user:args.user,
            model:args.model,
            details:args.details

        }
    }).catch(err=>{

    })

}

}


module.exports ={
    saveLog
}