Skip to content

Commit

Permalink
Revert "Revert "Use load balancer instance id in admin-db""
Browse files Browse the repository at this point in the history
This reverts commit d2ca09f.
  • Loading branch information
IanPhilips committed Oct 21, 2024
1 parent 9e1f988 commit a8e627d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions web/lib/supabase/admin-db.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { createClient } from 'common/supabase/utils'
import { ENV, ENV_CONFIG } from 'common/envs/constants'
import { ENV } from 'common/envs/constants'
import { getSecrets, getServiceAccountCredentials } from 'common/secrets'
import { getSupabaseInstanceId } from './db'

// the vercel names for these secrets
let key =
Expand All @@ -17,5 +18,5 @@ export async function initSupabaseAdmin() {
const result = await getSecrets(creds, 'SUPABASE_KEY')
key = result['SUPABASE_KEY']
}
return createClient(ENV_CONFIG.supabaseInstanceId, key)
return createClient(getSupabaseInstanceId(), key)
}

0 comments on commit a8e627d

Please sign in to comment.