methods now use correct mixins
This commit is contained in:
@@ -8,6 +8,8 @@ import creaturePermissionMixin from '/imports/api/mixins/creaturePermissionMixin
|
||||
import { setDocToLastMixin } from '/imports/api/mixins/setDocToLastMixin.js';
|
||||
import { setDocAncestryMixin, ensureAncestryContainsCharIdMixin } from '/imports/api/parenting/parenting.js';
|
||||
import simpleSchemaMixin from '/imports/api/mixins/simpleSchemaMixin.js';
|
||||
import propagateInheritanceUpdateMixin from '/imports/api/mixins/propagateInheritanceUpdateMixin.js';
|
||||
import updateSchemaMixin from '/imports/api/mixins/updateSchemaMixin.js';
|
||||
|
||||
let Notes = new Mongo.Collection("notes");
|
||||
|
||||
@@ -47,18 +49,13 @@ const insertNote = new ValidatedMethod({
|
||||
const updateNote = new ValidatedMethod({
|
||||
name: 'Notes.methods.update',
|
||||
mixins: [
|
||||
propagateInheritanceUpdateMixin,
|
||||
updateSchemaMixin,
|
||||
creaturePermissionMixin,
|
||||
simpleSchemaMixin,
|
||||
],
|
||||
collection: Notes,
|
||||
permission: 'edit',
|
||||
schema: new SimpleSchema({
|
||||
_id: SimpleSchema.RegEx.Id,
|
||||
update: NoteSchema.omit('name'),
|
||||
}),
|
||||
run({_id, update}) {
|
||||
return Notes.update(_id, {$set: update});
|
||||
},
|
||||
schema: NoteSchema,
|
||||
});
|
||||
|
||||
export default Notes;
|
||||
|
||||
Reference in New Issue
Block a user