We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
beforeSync
1 parent ac1e3cf commit 6114008Copy full SHA for 6114008
2 files changed
packages/plugin-search/src/types.ts
@@ -25,6 +25,7 @@ export type BeforeSync = (args: {
25
payload: Payload
26
req: PayloadRequest
27
searchDoc: DocToSync
28
+ collection: string
29
}) => DocToSync | Promise<DocToSync>
30
31
export type FieldsOverride = (args: { defaultFields: Field[] }) => Field[]
packages/plugin-search/src/utilities/syncDocAsSearchIndex.ts
@@ -40,6 +40,7 @@ export const syncDocAsSearchIndex = async ({
40
payload,
41
req,
42
searchDoc: dataToSave,
43
+ collection,
44
})
45
}
46
0 commit comments