Skip to content

Commit

Permalink
docs: fix arguments in experimental.actions code example (#11008)
Browse files Browse the repository at this point in the history
  • Loading branch information
k1350 committed May 13, 2024
1 parent 4b88068 commit dec82d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/astro/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -130,7 +130,7 @@

body: z.string(),
}),
handler: async ({ postId }, context) => {
handler: async ({ postId }) => {
// insert comments in db

return comment;
Expand Down
4 changes: 2 additions & 2 deletions packages/astro/src/@types/astro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit dec82d5

Please sign in to comment.