Skip to content

Commit

Permalink
chore: inline headers
Browse files Browse the repository at this point in the history
  • Loading branch information
luxass committed Jul 18, 2024
1 parent a4f7c9f commit f644b6d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions apps/www/server/api/examples/index.get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { parseAsync } from "valibot";
import type { Example } from "../../../types/example";

export default defineEventHandler(async () => {
const headers = {
"User-Agent": "lesetid.dev",
"X-GitHub-Api-Version": "2022-11-28",
"Authorization": `Bearer ${process.env.GITHUB_TOKEN}`,
};

const data = await $fetch("https://api.github.com/repos/luxass/lesetid/contents/examples", { headers });
const data = await $fetch("https://api.github.com/repos/luxass/lesetid/contents/examples", {
headers: {
"User-Agent": "lesetid.dev",
"X-GitHub-Api-Version": "2022-11-28",
"Authorization": `Bearer ${process.env.GITHUB_TOKEN}`,
},
});

const examplesOutput = await parseAsync(ExamplesSchema, data);

Expand Down

0 comments on commit f644b6d

Please sign in to comment.