aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorGravatar piotrruss <mail@pruss.it> 2022-06-01 18:07:07 +0100
committerGravatar piotrruss <mail@pruss.it> 2022-06-01 18:07:07 +0100
commit684377e55cc239aa1f09ef9c65e1f768e8733fa5 (patch)
tree4751ffdfb161e11a77969b915db8cd1e9cf6bc66 /models
parent308d07785f811ff470d0e90b11680926a823027b (diff)
downloadmy_apps-684377e55cc239aa1f09ef9c65e1f768e8733fa5.tar.gz
my_apps-684377e55cc239aa1f09ef9c65e1f768e8733fa5.tar.bz2
my_apps-684377e55cc239aa1f09ef9c65e1f768e8733fa5.zip
log activity
Diffstat (limited to 'models')
-rw-r--r--models/Log.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/models/Log.js b/models/Log.js
new file mode 100644
index 0000000..16875ee
--- /dev/null
+++ b/models/Log.js
@@ -0,0 +1,12 @@
+const mongoose = require('mongoose')
+
+const logSchema = new mongoose.Schema({
+ email: { type: String },
+ action: { type: String, required: true },
+ error: { type: String },
+ created_at: { type: Date, default: Date.now },
+})
+
+const Log = mongoose.models.Log || mongoose.model('Log', logSchema)
+
+export default Log