Skip to content

Commit

Permalink
i18n(ja): Update middleware.mdx for v3 (#4412)
Browse files Browse the repository at this point in the history
Co-authored-by: Yan Thomas <[email protected]>
  • Loading branch information
morinokami and yanthomasdev authored Aug 30, 2023
1 parent 55098b7 commit 9ad5898
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/content/docs/ja/guides/middleware.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const data = Astro.locals;

```ts
// src/middleware.ts
import { defineMiddleware } from "astro/middleware";
import { defineMiddleware } from "astro:middleware";

// `context`と`next`は自動的に型付けされます
export const onRequest = defineMiddleware((context, next) => {
Expand Down Expand Up @@ -136,7 +136,7 @@ export const onRequest = async (context, next) => {
[`sequence()`](#sequence)を使用して、複数のミドルウェアを指定した順序で連結できます。

```js title="src/middleware.js"
import { sequence } from "astro/middleware";
import { sequence } from "astro:middleware";

async function validation(_, next) {
console.log("validationリクエスト");
Expand Down

0 comments on commit 9ad5898

Please sign in to comment.