From dbaa342269adfabce4f85bb34190e5b4f90b01c0 Mon Sep 17 00:00:00 2001 From: KinfeMichael Tariku <65047246+Kinfe123@users.noreply.github.com> Date: Tue, 15 Jul 2025 08:16:42 +0300 Subject: [PATCH] docs: fix plugin after hook handler example (#3372) --- docs/content/docs/concepts/plugins.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/content/docs/concepts/plugins.mdx b/docs/content/docs/concepts/plugins.mdx index a06d027f..251b3b0f 100644 --- a/docs/content/docs/concepts/plugins.mdx +++ b/docs/content/docs/concepts/plugins.mdx @@ -242,7 +242,7 @@ const myPlugin = ()=>{ matcher: (context)=>{ return context.headers.get("x-my-header") === "my-value" }, - handler: createAuthMiddleware(async(ctx)=>{ + handler: createAuthMiddleware(async (ctx)=>{ //do something before the request return { context: ctx // if you want to modify the context @@ -253,11 +253,11 @@ const myPlugin = ()=>{ matcher: (context)=>{ return context.path === "/sign-up/email" }, - handler: async(ctx)=>{ + handler: createAuthMiddleware(async (ctx)=>{ return ctx.json({ message: "Hello World" }) // if you want to modify the response - } + }) }] } } satisfies BetterAuthPlugin