fix(hooks): incorrect hook executing for field-level afterChange

This commit is contained in:
Elliot DeNolf
2020-11-09 22:27:50 -05:00
parent 462f7f1f42
commit 8a1cdc3f7d
2 changed files with 4 additions and 4 deletions

View File

@@ -183,8 +183,8 @@ async function create(args) {
result = await performFieldOperations(collectionConfig, {
data: result,
hook: 'afterRead',
operation: 'read',
hook: 'afterChange',
operation: 'create',
req,
depth,
overrideAccess,

View File

@@ -223,8 +223,8 @@ async function update(args) {
doc = await this.performFieldOperations(collectionConfig, {
data: doc,
hook: 'afterRead',
operation: 'read',
hook: 'afterChange',
operation: 'update',
req,
id,
depth,