initial commit

This commit is contained in:
Brian McGonagill 2022-08-04 19:50:18 -05:00
parent b7c7d8b449
commit 750811a81f
52 changed files with 25204 additions and 92 deletions

16
server/accountsConfig.js Normal file
View file

@ -0,0 +1,16 @@
Accounts.emailTemplates.from = 'no-reply@parentpickup.org';
Accounts.emailTemplates.siteName = 'Parent Pickup';
Accounts.emailTemplates.verifyEmail = {
subject() {
return 'Confirm Your Email Address Please';
},
text(user, url) {
let emailAddress = user.emails[0].address,
urlWithoutHash = url.replace('#/', ''),
supportEmail = "no-reply@parentpickup.org",
emailBody = "Thank you for signing up to use Parent Pickup!\n\n You signed up with " + emailAddress + " . Please confirm your email address.\n\n We will not enroll you in any mailing lists, nor will we ever share you email address or personal information for any reason.\n\n You can confirm you address by clicking the following link: \n\n " + urlWithoutHash
return emailBody;
},
}

10
server/main.js Normal file
View file

@ -0,0 +1,10 @@
import { Meteor } from 'meteor/meteor';
Meteor.startup(() => {
// code to run on server at startup
Roles.createRole("parent", {unlessExists: true});
Roles.createRole("admin", {unlessExists: true});
Roles.createRole("systemadmin", {unlessExists: true});
Roles.createRole("monitor", {unlessExists: true});
Roles.createRole("teacher", {unlessExists: true});
});

11
server/methods.js Normal file
View file

@ -0,0 +1,11 @@
import { Meteor } from 'meteor/meteor';
import { Mongo } from 'meteor/mongo';
import { check } from 'meteor/check';
Meteor.methods({
'addToRole' (role) {
console.log("User id for role: " + Meteor.userId() );
let userId = Meteor.userId();
Roles.addUsersToRoles(userId, role);
},
});

18
server/publish.js Normal file
View file

@ -0,0 +1,18 @@
import { SysConfig } from '../imports/api/systemConfig.js';
import { ServiceEntities } from '../imports/api/serviceentities.js';
Meteor.publish("SystemConfig", function() {
try {
return SysConfig.find({});
} catch (error) {
console.log(" ERROR pulling system config data: " + error);
}
});
Meteor.publish("ServiceEntities", function() {
try {
return ServiceEntities.find({});
} catch (error) {
console.log(" ERROR pulling Service Entity data: " + error);
}
});