Built most of the user routes, and begun work on utils

This commit is contained in:
Johnathon Slightham
2021-05-04 02:12:49 -04:00
parent 1758e9c3ee
commit 289b2d1213
9 changed files with 554 additions and 21 deletions

20
utils.js Normal file
View File

@@ -0,0 +1,20 @@
let User = require('./user.model');
let Session = require('./session.model');
let Message = require('./message.model');
const purgeSessions = () => {
// TODO: Write a function to purge all old session IDs automatically, use cron to schedule
}
const loadDefaultTemplates = () => {
// TODO: Write a function that loads default mailing templates into the database
}
const sendMail = (user, message) => {
// TODO: Write a function that can take in a message and a user and send the email using nodemailer
}
module.exports.purgeSessions = purgeSessions;
module.exports.loadDefaultTemplates = loadDefaultTemplates;
module.exports.sendMail = sendMail;