docs: add missing import (#2183)

fix undefined var error.
This commit is contained in:
iain maitland
2023-12-18 21:45:31 +01:00
committed by GitHub
parent 8d321b6049
commit 7af80da802
+3 -2
View File
@@ -63,7 +63,7 @@ File uploads can be handled in a very similar manner to the example above. Note
that this time, we have to explicitly declare the form's encoding.
```tsx routes/subscribe.tsx
import { Handlers } from "$fresh/server.ts";
import { Handlers, type RouteContext } from "$fresh/server.ts";
export const handler: Handlers = {
async GET(req, ctx) {
@@ -90,7 +90,8 @@ export const handler: Handlers = {
},
};
export default function Upload() {
export default function Upload(req: Request, ctx: RouteContext) {
const { message } = ctx.data;
return (
<>
<form method="post" encType="multipart/form-data">