0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-27 22:19:04 -05:00

docs: fix grammatical mix-up (#11039)

This commit is contained in:
Bkh 2024-05-15 10:20:46 +05:00 committed by GitHub
parent 6f948903fc
commit cf8dee4d62
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1743,7 +1743,7 @@ export interface AstroUserConfig {
* *
* Declare all your actions in `src/actions/index.ts`. This file is the global actions handler. * Declare all your actions in `src/actions/index.ts`. This file is the global actions handler.
* *
* Define an action using the `defineAction()` utility from the `astro:actions` module. These accept the `handler` property to define your server-side request handler. If your action accepts arguments, apply the `input` property to validate parameters with Zod. * Define an action using the `defineAction()` utility from the `astro:actions` module. An action accepts the `handler` property to define your server-side request handler. If your action accepts arguments, apply the `input` property to validate parameters with Zod.
* *
* This example defines two actions: `like` and `comment`. The `like` action accepts a JSON object with a `postId` string, while the `comment` action accepts [FormData](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest_API/Using_FormData_Objects) with `postId`, `author`, and `body` strings. Each `handler` updates your database and return a type-safe response. * This example defines two actions: `like` and `comment`. The `like` action accepts a JSON object with a `postId` string, while the `comment` action accepts [FormData](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest_API/Using_FormData_Objects) with `postId`, `author`, and `body` strings. Each `handler` updates your database and return a type-safe response.
* *