Skip to content

Commit

Permalink
Change env var name for supabase key
Browse files Browse the repository at this point in the history
Corresponding to the name existing in `.env.example`
  • Loading branch information
farnoux committed Jan 20, 2025
1 parent 9ebc968 commit 02ceda4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ api-test:
--name api_test_tet \
--network $network \
--env SUPABASE_URL=$API_URL \
--env SUPABASE_KEY=$SERVICE_ROLE_KEY \
--env SUPABASE_ANON_KEY=$SERVICE_ROLE_KEY \
--env SUPABASE_SERVICE_ROLE_KEY=$SERVICE_ROLE_KEY \
api-test:latest test --no-check -A tests/$test/*.test.ts --location 'http://localhost'
END
Expand All @@ -625,7 +625,7 @@ api-crud-test:
--name api_crud_test_tet \
--network $network \
--env SUPABASE_URL=$API_URL \
--env SUPABASE_KEY=$ANON_KEY \
--env SUPABASE_ANON_KEY=$ANON_KEY \
api-test:latest test -A tests/crud/crud.test.ts --location 'http://localhost' -- elements:axe

cypress-wip:
Expand Down
14 changes: 7 additions & 7 deletions api_tests/lib/supabase.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import "https://deno.land/x/dotenv/load.ts";
import { createClient } from "https://esm.sh/@supabase/[email protected]";
import { Database } from "./database.types.ts";
import 'https://deno.land/x/dotenv/load.ts';
import { createClient } from 'https://esm.sh/@supabase/[email protected]';
import { Database } from './database.types.ts';

/**
* Supabase client
*/
export const supabase = createClient<Database>(
Deno.env.get("SUPABASE_URL")!,
Deno.env.get("SUPABASE_KEY")!,
Deno.env.get('SUPABASE_URL')!,
Deno.env.get('SUPABASE_ANON_KEY')!,
{
db: {
schema: "public",
schema: 'public',
},
auth: {
// Pour fonctionner avec deno hors du navigateur.
persistSession: false,
},
},
}
);

0 comments on commit 02ceda4

Please sign in to comment.