From 93b094ca38aa8d200481d336ed5e557995d974f3 Mon Sep 17 00:00:00 2001 From: Lim Ding Wen Date: Wed, 31 Jul 2024 17:33:27 +0800 Subject: [PATCH] Test search with anon key --- scripts/.env.example | 3 ++- scripts/deploy-and-run/fetch-mp-data.sh | 2 +- scripts/deploy-and-run/fill-debate-speaker-ids.sh | 2 +- scripts/deploy-and-run/generate-bills-summary.sh | 2 +- scripts/deploy-and-run/generate-debate-summary.sh | 2 +- scripts/deploy-and-run/per-1-hour.sh | 2 +- scripts/deploy-and-run/per-10-min.sh | 2 +- scripts/deploy-and-run/scrape-bills-introduced.sh | 2 +- scripts/deploy-and-run/scrape-bills-pdf.sh | 2 +- scripts/deploy-and-run/scrape-sitting-dates.sh | 2 +- scripts/deploy-and-run/scrape-sitting-report.sh | 2 +- scripts/deploy-and-run/search.sh | 2 +- 12 files changed, 13 insertions(+), 12 deletions(-) diff --git a/scripts/.env.example b/scripts/.env.example index 5b41a99..4160342 100644 --- a/scripts/.env.example +++ b/scripts/.env.example @@ -1,2 +1,3 @@ SUPABASE_PROJECT_ID="TODO" -SUPABASE_FUNCTIONS_KEY="TODO" \ No newline at end of file +SUPABASE_SERVICE_ROLE_KEY="TODO" +SUPABASE_ANON_KEY="TODO" \ No newline at end of file diff --git a/scripts/deploy-and-run/fetch-mp-data.sh b/scripts/deploy-and-run/fetch-mp-data.sh index 9b2655b..7593786 100644 --- a/scripts/deploy-and-run/fetch-mp-data.sh +++ b/scripts/deploy-and-run/fetch-mp-data.sh @@ -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" "{}" \ No newline at end of file +run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}" \ No newline at end of file diff --git a/scripts/deploy-and-run/fill-debate-speaker-ids.sh b/scripts/deploy-and-run/fill-debate-speaker-ids.sh index 1eaf49a..5c91dda 100644 --- a/scripts/deploy-and-run/fill-debate-speaker-ids.sh +++ b/scripts/deploy-and-run/fill-debate-speaker-ids.sh @@ -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" "{}" \ No newline at end of file +run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}" \ No newline at end of file diff --git a/scripts/deploy-and-run/generate-bills-summary.sh b/scripts/deploy-and-run/generate-bills-summary.sh index 4398e18..d758ad8 100644 --- a/scripts/deploy-and-run/generate-bills-summary.sh +++ b/scripts/deploy-and-run/generate-bills-summary.sh @@ -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" "{}" \ No newline at end of file +run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}" \ No newline at end of file diff --git a/scripts/deploy-and-run/generate-debate-summary.sh b/scripts/deploy-and-run/generate-debate-summary.sh index b056c54..a115320 100644 --- a/scripts/deploy-and-run/generate-debate-summary.sh +++ b/scripts/deploy-and-run/generate-debate-summary.sh @@ -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" "{}" \ No newline at end of file +run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}" \ No newline at end of file diff --git a/scripts/deploy-and-run/per-1-hour.sh b/scripts/deploy-and-run/per-1-hour.sh index b602e7b..49cdb78 100644 --- a/scripts/deploy-and-run/per-1-hour.sh +++ b/scripts/deploy-and-run/per-1-hour.sh @@ -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" "{}" \ No newline at end of file +run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}" \ No newline at end of file diff --git a/scripts/deploy-and-run/per-10-min.sh b/scripts/deploy-and-run/per-10-min.sh index 1ecd4c2..569d1c6 100644 --- a/scripts/deploy-and-run/per-10-min.sh +++ b/scripts/deploy-and-run/per-10-min.sh @@ -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" "{}" \ No newline at end of file +run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}" \ No newline at end of file diff --git a/scripts/deploy-and-run/scrape-bills-introduced.sh b/scripts/deploy-and-run/scrape-bills-introduced.sh index 9363b54..95accd8 100644 --- a/scripts/deploy-and-run/scrape-bills-introduced.sh +++ b/scripts/deploy-and-run/scrape-bills-introduced.sh @@ -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" "{}" \ No newline at end of file +run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}" \ No newline at end of file diff --git a/scripts/deploy-and-run/scrape-bills-pdf.sh b/scripts/deploy-and-run/scrape-bills-pdf.sh index 18d9463..a8943c4 100644 --- a/scripts/deploy-and-run/scrape-bills-pdf.sh +++ b/scripts/deploy-and-run/scrape-bills-pdf.sh @@ -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" "{}" \ No newline at end of file +run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}" \ No newline at end of file diff --git a/scripts/deploy-and-run/scrape-sitting-dates.sh b/scripts/deploy-and-run/scrape-sitting-dates.sh index 2ed5a03..6b8eb02 100644 --- a/scripts/deploy-and-run/scrape-sitting-dates.sh +++ b/scripts/deploy-and-run/scrape-sitting-dates.sh @@ -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" "{}" \ No newline at end of file +run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}" \ No newline at end of file diff --git a/scripts/deploy-and-run/scrape-sitting-report.sh b/scripts/deploy-and-run/scrape-sitting-report.sh index 71cbec4..2ba562e 100644 --- a/scripts/deploy-and-run/scrape-sitting-report.sh +++ b/scripts/deploy-and-run/scrape-sitting-report.sh @@ -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" "{}" \ No newline at end of file +run "$SUPABASE_PROJECT_ID" "$SUPABASE_SERVICE_ROLE_KEY" "$FUNCTION_NAME" "{}" \ No newline at end of file diff --git a/scripts/deploy-and-run/search.sh b/scripts/deploy-and-run/search.sh index bbcbc23..641d9d6 100644 --- a/scripts/deploy-and-run/search.sh +++ b/scripts/deploy-and-run/search.sh @@ -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"}' \ No newline at end of file +run "$SUPABASE_PROJECT_ID" "$SUPABASE_ANON_KEY" "$FUNCTION_NAME" '{"query": "30 by 30"}' \ No newline at end of file