0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-02-17 22:44:24 -05:00

docs: fix arguments in experimental.actions code example (#11008)

This commit is contained in:
K.Mitamura 2024-05-13 20:26:50 +09:00 committed by GitHub
parent 4b88068919
commit dec82d5c8d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -117,7 +117,7 @@
export const server = {
like: defineAction({
input: z.object({ postId: z.string() }),
handler: async ({ postId }, context) => {
handler: async ({ postId }) => {
// update likes in db
return likes;
@ -130,7 +130,7 @@
body: z.string(),
}),
handler: async ({ postId }, context) => {
handler: async ({ postId }) => {
// insert comments in db
return comment;

View file

@ -1754,7 +1754,7 @@ export interface AstroUserConfig {
* export const server = {
* like: defineAction({
* input: z.object({ postId: z.string() }),
* handler: async ({ postId }, context) => {
* handler: async ({ postId }) => {
* // update likes in db
*
* return likes;
@ -1767,7 +1767,7 @@ export interface AstroUserConfig {
* author: z.string(),
* body: z.string(),
* }),
* handler: async ({ postId }, context) => {
* handler: async ({ postId }) => {
* // insert comments in db
*
* return comment;