Skip to content

Commit

Permalink
chore: update supabase key name
Browse files Browse the repository at this point in the history
  • Loading branch information
0x4007 committed Feb 20, 2024
1 parent bed39fe commit e0ef364
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WEBHOOK_PROXY_URL=
WEBHOOK_SECRET=

SUPABASE_URL=
SUPABASE_KEY=
SUPABASE_ANON_KEY=

# `fatal` `error` `info` `verbose` `debug`
LOG_LEVEL=debug
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
# OPENAI_API_KEY:
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
# SIMILARITY_THRESHOLD:
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
TEST_ADMIN_PAT: ${{ secrets.TEST_ADMIN_PAT }}
TEST_ORGANIZATION_NAME: ${{ secrets.TEST_ORGANIZATION_NAME }}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ bun start:watch
- Copy `.env.example` to `.env` (do not rename .env.example, just make a copy)
- Update the following fields on `.env`:
- `SUPABASE_URL`: Add your Supabase project URL.
- `SUPABASE_KEY`: Add your Supabase project API key.
- `SUPABASE_ANON_KEY`: Add your Supabase project API key.
- `FOLLOWUP_TIME`: (optional) Set a custom follow-up time (default: 4 days).
- `DISQUALIFY_TIME`: (optional) Set a custom disqualify time (default: 7 days).
- `OPENAI_API_HOST`: (optional) Set OpenAI host url (default: https://api.openai.com).
Expand Down Expand Up @@ -218,7 +218,7 @@ To test the bot, you can:
```
SUPABASE_URL="XXX"
SUPABASE_KEY="XXX"
SUPABASE_ANON_KEY="XXX"
```

Expand Down
2 changes: 1 addition & 1 deletion src/adapters/adapters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Wallet } from "./supabase/helpers/tables/wallet";
import { env } from "../bindings/env";
import { Database } from "./supabase/types/database";

export const supabaseClient = createClient<Database>(env.SUPABASE_URL, env.SUPABASE_KEY, {
export const supabaseClient = createClient<Database>(env.SUPABASE_URL, env.SUPABASE_ANON_KEY, {
auth: { persistSession: false },
});

Expand Down
4 changes: 2 additions & 2 deletions src/adapters/supabase/helpers/tables/wallet.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { GitHubUser } from "../../../../types/payload";
import { createAdapters } from "../../../adapters";
const SUPABASE_URL = process.env.SUPABASE_URL;
if (!SUPABASE_URL) throw new Error("SUPABASE_URL is not defined");
const SUPABASE_KEY = process.env.SUPABASE_KEY;
if (!SUPABASE_KEY) throw new Error("SUPABASE_KEY is not defined");
const SUPABASE_ANON_KEY = process.env.SUPABASE_ANON_KEY;
if (!SUPABASE_ANON_KEY) throw new Error("SUPABASE_ANON_KEY is not defined");

async function getWalletAddressAndUrlTest() {
const { wallet } = createAdapters().supabase;
Expand Down
2 changes: 1 addition & 1 deletion src/types/configuration-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const envConfigSchema = T.Object({
LOG_LEVEL: T.Enum(LogLevel, { default: LogLevel.DEBUG }),
LOG_RETRY_LIMIT: T.Number({ default: 8 }),
SUPABASE_URL: T.String({ format: "uri" }),
SUPABASE_KEY: T.String(),
SUPABASE_ANON_KEY: T.String(),
PRIVATE_KEY: T.String(),
APP_ID: T.Number(),
});
Expand Down
2 changes: 1 addition & 1 deletion supabase/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

```
SUPABASE_URL=XXX
SUPABASE_KEY=XXX
SUPABASE_ANON_KEY=XXX
```

2. [The Supabase CLI](https://supabase.com/docs/guides/resources/supabase-cli) available as a node package through the dev dependencies provides tools to develop your project locally and deploy to the Supabase Platform.
Expand Down

0 comments on commit e0ef364

Please sign in to comment.