Skip to content

Commit c9a06b0

Browse files
Nin3leeliruifengv
andauthored
i18n(zh-cn): Update actions.mdx (#10554)
Co-authored-by: liruifengv <[email protected]>
1 parent 32a8f9c commit c9a06b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/content/docs/zh-cn/guides/actions.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ const result = Astro.getActionResult(actions.newsletter);
500500
const inputErrors = isInputError(result?.error) ? result.error.fields : {};
501501
---
502502
503-
<form method="POST" action={'/confirmation' + actions.newsletter}>
503+
<form method="POST" action={actions.newsletter}>
504504
<label>
505505
E-mail
506506
<input required type="email" name="email" aria-describedby="error" />
@@ -701,7 +701,7 @@ import { actions } from 'astro:actions';
701701
702702
const searchQuery = Astro.url.searchParams.get('search');
703703
if (searchQuery) {
704-
const { data, error } = Astro.callAction(actions.findProduct, { query: searchQuery });
704+
const { data, error } = await Astro.callAction(actions.findProduct, { query: searchQuery });
705705
// 处理结果
706706
}
707707
---

0 commit comments

Comments
 (0)