mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-05-05 07:59:30 -05:00
Add teamID to monitor on creation
This commit is contained in:
@@ -364,10 +364,10 @@ const getMonitorsByUserId = async (req, res) => {
|
||||
*/
|
||||
const createMonitor = async (req, res) => {
|
||||
try {
|
||||
console.log(req.body);
|
||||
const monitor = new Monitor({ ...req.body });
|
||||
// Remove notifications fom monitor as they aren't needed here
|
||||
monitor.notifications = undefined;
|
||||
monitor.userId = req.user._id;
|
||||
await monitor.save();
|
||||
return monitor;
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user