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:
parent
4b88068919
commit
dec82d5c8d
2 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue