mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-18 03:29:15 +00:00
22 lines
388 B
JavaScript
22 lines
388 B
JavaScript
class DatabaseClass {
|
|
history = []
|
|
engineDB
|
|
constructor(_engineDB) {
|
|
this.engineDB = _engineDB
|
|
}
|
|
|
|
/**
|
|
* Se debe guardar mensaje numero
|
|
* @param {*} ctx
|
|
* @returns
|
|
*/
|
|
saveLog = (ctx) => {
|
|
this.history.pop()
|
|
this.history.push(ctx)
|
|
this.engineDB.save(ctx)
|
|
return ctx
|
|
}
|
|
}
|
|
|
|
module.exports = DatabaseClass
|