mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 01:51:40 -05:00
fix default mutation bug
This commit is contained in:
parent
c9fb536056
commit
bac853d438
1 changed files with 2 additions and 2 deletions
|
@ -54,7 +54,7 @@ export const getDefaultMutations = (collectionName, options = {}) => ({
|
|||
// check function called on a user and document to see if they can perform the operation
|
||||
check(user, document) {
|
||||
if (options.editCheck) {
|
||||
return options.editCheck(user);
|
||||
return options.editCheck(user, document);
|
||||
}
|
||||
|
||||
if (!user || !document) return false;
|
||||
|
@ -96,7 +96,7 @@ export const getDefaultMutations = (collectionName, options = {}) => ({
|
|||
|
||||
check(user, document) {
|
||||
if (options.removeCheck) {
|
||||
return options.removeCheck(user);
|
||||
return options.removeCheck(user, document);
|
||||
}
|
||||
|
||||
if (!user || !document) return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue