Skip to content

Commit

Permalink
Test search with anon key
Browse files Browse the repository at this point in the history
  • Loading branch information
limdingwen committed Jul 31, 2024
1 parent 7913fb8 commit 93b094c
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 12 deletions.
3 changes: 2 additions & 1 deletion scripts/.env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
SUPABASE_PROJECT_ID="TODO"
SUPABASE_FUNCTIONS_KEY="TODO"
SUPABASE_SERVICE_ROLE_KEY="TODO"
SUPABASE_ANON_KEY="TODO"
2 changes: 1 addition & 1 deletion scripts/deploy-and-run/fetch-mp-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ source ../lib/functions/run.sh
FUNCTION_NAME="fetch-mp-data"

deploy "$SUPABASE_PROJECT_ID" "$FUNCTION_NAME"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_FUNCTIONS_KEY" "$FUNCTION_NAME" "{}"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}"
2 changes: 1 addition & 1 deletion scripts/deploy-and-run/fill-debate-speaker-ids.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ source ../lib/functions/run.sh
FUNCTION_NAME="fill-debate-speaker-ids"

deploy "$SUPABASE_PROJECT_ID" "$FUNCTION_NAME"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_FUNCTIONS_KEY" "$FUNCTION_NAME" "{}"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}"
2 changes: 1 addition & 1 deletion scripts/deploy-and-run/generate-bills-summary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ source ../lib/functions/run.sh
FUNCTION_NAME="generate-bills-summary"

deploy "$SUPABASE_PROJECT_ID" "$FUNCTION_NAME"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_FUNCTIONS_KEY" "$FUNCTION_NAME" "{}"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}"
2 changes: 1 addition & 1 deletion scripts/deploy-and-run/generate-debate-summary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ source ../lib/functions/run.sh
FUNCTION_NAME="generate-debate-summary"

deploy "$SUPABASE_PROJECT_ID" "$FUNCTION_NAME"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_FUNCTIONS_KEY" "$FUNCTION_NAME" "{}"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}"
2 changes: 1 addition & 1 deletion scripts/deploy-and-run/per-1-hour.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ source ../lib/functions/run.sh
FUNCTION_NAME="per-1-hour"

deploy "$SUPABASE_PROJECT_ID" "$FUNCTION_NAME"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_FUNCTIONS_KEY" "$FUNCTION_NAME" "{}"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}"
2 changes: 1 addition & 1 deletion scripts/deploy-and-run/per-10-min.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ source ../lib/functions/run.sh
FUNCTION_NAME="per-10-min"

deploy "$SUPABASE_PROJECT_ID" "$FUNCTION_NAME"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_FUNCTIONS_KEY" "$FUNCTION_NAME" "{}"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}"
2 changes: 1 addition & 1 deletion scripts/deploy-and-run/scrape-bills-introduced.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ source ../lib/functions/run.sh
FUNCTION_NAME="scrape-bills-introduced"

deploy "$SUPABASE_PROJECT_ID" "$FUNCTION_NAME"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_FUNCTIONS_KEY" "$FUNCTION_NAME" "{}"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}"
2 changes: 1 addition & 1 deletion scripts/deploy-and-run/scrape-bills-pdf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ source ../lib/functions/run.sh
FUNCTION_NAME="scrape-bills-pdf"

deploy "$SUPABASE_PROJECT_ID" "$FUNCTION_NAME"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_FUNCTIONS_KEY" "$FUNCTION_NAME" "{}"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}"
2 changes: 1 addition & 1 deletion scripts/deploy-and-run/scrape-sitting-dates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ source ../lib/functions/run.sh
FUNCTION_NAME="scrape-sitting-dates"

deploy "$SUPABASE_PROJECT_ID" "$FUNCTION_NAME"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_FUNCTIONS_KEY" "$FUNCTION_NAME" "{}"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}"
2 changes: 1 addition & 1 deletion scripts/deploy-and-run/scrape-sitting-report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ source ../lib/functions/run.sh
FUNCTION_NAME="scrape-sitting-report"

deploy "$SUPABASE_PROJECT_ID" "$FUNCTION_NAME"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_FUNCTIONS_KEY" "$FUNCTION_NAME" "{}"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}"
2 changes: 1 addition & 1 deletion scripts/deploy-and-run/search.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ source ../lib/functions/run.sh
FUNCTION_NAME="search"

deploy "$SUPABASE_PROJECT_ID" "$FUNCTION_NAME"
run "$SUPABASE_PROJECT_ID" "$SUPABASE_FUNCTIONS_KEY" "$FUNCTION_NAME" '{"query": "30 by 30"}'
run "$SUPABASE_PROJECT_ID" "$SUPABASE_ANON_KEY" "$FUNCTION_NAME" '{"query": "30 by 30"}'

0 comments on commit 93b094c

Please sign in to comment.