Skip to content

Commit 7251f67

Browse files
committed
chore: update types
1 parent 02110fb commit 7251f67

File tree

1 file changed

+5
-5
lines changed
  • packages/plugin-form-builder/src/collections/FormSubmissions/hooks

1 file changed

+5
-5
lines changed

packages/plugin-form-builder/src/collections/FormSubmissions/hooks/sendEmail.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import type { CollectionBeforeChangeHook } from 'payload'
1+
import type { CollectionAfterChangeHook } from 'payload'
22

33
import type { Email, FormattedEmail, FormBuilderPluginConfig } from '../../../types.js'
44

55
import { serializeLexical } from '../../../utilities/lexical/serializeLexical.js'
66
import { replaceDoubleCurlys } from '../../../utilities/replaceDoubleCurlys.js'
77
import { serializeSlate } from '../../../utilities/slate/serializeSlate.js'
88

9-
type BeforeChangeParams = Parameters<CollectionBeforeChangeHook>[0]
9+
type AfterChangeParams = Parameters<CollectionAfterChangeHook>[0]
1010

1111
export const sendEmail = async (
12-
beforeChangeParameters: BeforeChangeParams,
12+
afterChangeParameters: AfterChangeParams,
1313
formConfig: FormBuilderPluginConfig,
14-
): Promise<BeforeChangeParams['data']> => {
15-
const { data, operation, req } = beforeChangeParameters
14+
): Promise<AfterChangeParams['data']> => {
15+
const { data, operation, req } = afterChangeParameters
1616

1717
if (operation === 'create') {
1818
const {

0 commit comments

Comments
 (0)