Initial commit
This commit is contained in:
commit
35745a89ec
44 changed files with 3342 additions and 0 deletions
36
server/publish.js
Normal file
36
server/publish.js
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
import { SysConfig } from "../imports/api/systemConfig";
|
||||
import { UpdateInfo } from "../imports/api/updateInfo";
|
||||
import { MScripts } from "../imports/api/mScripts";
|
||||
import { UserInfo } from "../imports/api/userInfo";
|
||||
import { Roels } from "meteor/roles";
|
||||
|
||||
Meteor.publish("SystemConfig", function() {
|
||||
try {
|
||||
return SysConfig.find({});
|
||||
} catch (error) {
|
||||
console.log(" ERROR pulling system config data: " + error);
|
||||
}
|
||||
});
|
||||
|
||||
Meteor.publish("UpdateVersion", function() {
|
||||
try {
|
||||
return UpdateInfo.find({ viewed: false });
|
||||
} catch(error) {
|
||||
console.log(" ERROR pulling updated version info: " + error);
|
||||
}
|
||||
});
|
||||
|
||||
Meteor.publish("UserInfo", function() {
|
||||
try {
|
||||
return this.userId;
|
||||
} catch(error) {
|
||||
console.log(" ERROR getting user Id: " + error);
|
||||
}
|
||||
});
|
||||
|
||||
Meteor.publish(null, function () {
|
||||
if (this.userId) {
|
||||
return Meteor.roleAssignment.find({ "user._id": this.userId });
|
||||
}
|
||||
this.ready();
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue