Skip to content

Commit

Permalink
Move after add event before index.
Browse files Browse the repository at this point in the history
  • Loading branch information
robgietema committed Apr 27, 2024
1 parent d07da6c commit 3e3e6e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/routes/content/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,15 +416,15 @@ export default [
// Fetch type
await document.fetchRelated('_type', trx);

// Trigger onAfterAdd
await config.events.trigger('onAfterAdd', document, trx);

// Index new document
await document.index(trx);

// Fetch related lists
await document.fetchRelationLists(trx);

// Trigger onAfterAdd
await config.events.trigger('onAfterAdd', document, trx);

// Send data back to client
return {
status: 201,
Expand Down

0 comments on commit 3e3e6e3

Please sign in to comment.