Skip to content

Commit

Permalink
Get environment from /dynamic/private
Browse files Browse the repository at this point in the history
  • Loading branch information
iainmerrick committed Nov 3, 2023
1 parent 4da6327 commit d8b2c3a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions website/src/routes/go/[...goproxy]/+server.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { error, type RequestHandler } from "@sveltejs/kit";
import { goproxy } from "gosub-goproxy";
import { env } from "$env/dynamic/private";

const config = {
url: "https://github.com/more-please/utf64",
Expand All @@ -8,11 +9,11 @@ const config = {
tagPrefix: "go-",
};

const env = {
githubToken: process.env.GITHUB_TOKEN,
const ENV = {
githubToken: env.GITHUB_TOKEN,
};

const handler = goproxy("/go", config, env);
const handler = goproxy("/go", config, ENV);

export const GET: RequestHandler = async (event) => {
const response = await handler(event.request);
Expand Down

0 comments on commit d8b2c3a

Please sign in to comment.