Skip to content

Commit

Permalink
chore: apply automated updates
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Jun 17, 2024
1 parent 452a7bd commit 3249ca7
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions examples/cors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,22 @@ import { createApp, createRouter, defineEventHandler, handleCors } from "h3";
export const app = createApp();

const corsHandler = defineEventHandler((event) => {
if (
handleCors(event, {
origin: "*",
})
) {
return;
}
})
if (
handleCors(event, {
origin: "*",
})
) {
return;
}
});

app.use(corsHandler);

const router = createRouter()
.get(
"/hello",
defineEventHandler(() => {
return "world";
}),
);
const router = createRouter().get(
"/hello",
defineEventHandler(() => {
return "world";
}),
);

app.use(router);

0 comments on commit 3249ca7

Please sign in to comment.