Updated the models.

This commit is contained in:
2022-06-20 08:24:35 -07:00
parent f5e98bee03
commit 6c6778d58e
14 changed files with 661 additions and 3186 deletions

View File

@@ -1,7 +1,8 @@
import {Mongo} from "meteor/mongo";
import {Meteor} from "meteor/meteor";
import {Students} from "./students";
import {Rooms} from "./rooms";
import {Staff} from "./staff";
import { Roles } from 'meteor/alanning:roles';
export const Sites = new Mongo.Collection('sites');
@@ -29,7 +30,7 @@ Meteor.methods({
if(site) {
//Clear any site references in student/room entries.
Students.update({siteId: _id}, {$unset: {siteId: 1}});
Rooms.update({siteId: _id}, {$unset: {siteId: 1}});
Staff.update({siteId: _id}, {$unset: {siteId: 1}});
Sites.remove({_id});
}
}