Skip to content

Commit

Permalink
include dev/test env values inline
Browse files Browse the repository at this point in the history
- verified that this not a safety concern
  • Loading branch information
bdb-dd committed Apr 16, 2024
1 parent 837659d commit f271993
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions apps/admin/src/supabase/SupabaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ import { createClient, SupabaseClient } from "@supabase/supabase-js";
console.log("Initializing Supabase client with provided URL and Anon Key.");

// Initialize Supabase client
const supabaseUrl = import.meta.env.VITE_SLACK_APP_SUPABASE_API_URL;
const supabaseAnonKey = import.meta.env.VITE_SLACK_APP_SUPABASE_ANON_KEY;
const supabaseUrl = window.location.href === 'https://digdir-assistants-test.gentlemoss-ac9ca445.norwayeast.azurecontainerapps.io/'
? 'https://ncxehajalbrwbicnzxmn.supabase.co'
: import.meta.env.VITE_SLACK_APP_SUPABASE_API_URL;

const supabaseAnonKey = window.location.href === 'https://digdir-assistants-test.gentlemoss-ac9ca445.norwayeast.azurecontainerapps.io/'
? 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im5jeGVoYWphbGJyd2JpY256eG1uIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTMyNzE0NTMsImV4cCI6MjAyODg0NzQ1M30.6aEnHNqCnMdaEQl_8iaI7aGIf3XBFTR8BEI7N55vFvU'
: import.meta.env.VITE_SLACK_APP_SUPABASE_ANON_KEY;

const supabase: SupabaseClient = createClient(supabaseUrl, supabaseAnonKey);

Expand Down

0 comments on commit f271993

Please sign in to comment.