mirror of
https://github.com/vale981/Vulcan
synced 2025-03-07 02:21:43 -05:00
28 lines
598 B
JavaScript
28 lines
598 B
JavaScript
import { createCollection, getDefaultResolvers, getDefaultMutations } from 'meteor/vulcan:core';
|
|
import schema from './schema.js';
|
|
import Users from 'meteor/vulcan:users';
|
|
|
|
const Events = createCollection({
|
|
|
|
collectionName: 'AnalyticsEvents',
|
|
|
|
typeName: 'AnalyticsEvent',
|
|
|
|
schema,
|
|
|
|
resolvers: getDefaultResolvers('AnalyticsEvents'),
|
|
|
|
mutations: getDefaultMutations('AnalyticsEvents', {
|
|
newCheck: () => true,
|
|
update: false,
|
|
upsert: false,
|
|
delete: false,
|
|
})
|
|
|
|
});
|
|
|
|
Events.checkAccess = (currentUser, doc) => {
|
|
return Users.isAdmin(currentUser);
|
|
}
|
|
|
|
export default Events;
|