Skip to content

Commit

Permalink
Merge pull request #17 from supabase/pcnc/fix-token-usage
Browse files Browse the repository at this point in the history
fix: `gqlPostOrThrow` config var usage
  • Loading branch information
pcnc authored Mar 12, 2024
2 parents c7224ae + a2a93be commit 7beeaec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ class Client {
}

async gqlPostOrThrow<U, V>(payload: GraphQLRequest<U>): Promise<V> {
const token = process.env.FLY_API_TOKEN
const resp = await crossFetch(`${FLY_API_GRAPHQL}/graphql`, {
const token = this.apiKey
const resp = await crossFetch(`${this.graphqlUrl}/graphql`, {
method: 'POST',
headers: {
Authorization: `Bearer ${token}`,
Expand Down

0 comments on commit 7beeaec

Please sign in to comment.