From 1e6cbdf2292c997f6f4fa496c7a7cd2963a526d5 Mon Sep 17 00:00:00 2001 From: Raphael Arce Date: Mon, 14 Oct 2024 14:18:58 +0200 Subject: [PATCH 1/3] docs: update codeowners Signed-off-by: Raphael Arce --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index b305540a..821d9e20 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @ff6347 @Jaszkowic +* @Jaszkowic @raphael-arce From c2a1fd5ffea5c362ce67f667f60cfec42d378c3b Mon Sep 17 00:00:00 2001 From: Raphael Arce Date: Fri, 11 Oct 2024 16:58:45 +0200 Subject: [PATCH 2/3] feat: add function to check if username is taken Signed-off-by: Raphael Arce --- ...241011145739_add_is_username_taken_function.sql | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 supabase/migrations/20241011145739_add_is_username_taken_function.sql diff --git a/supabase/migrations/20241011145739_add_is_username_taken_function.sql b/supabase/migrations/20241011145739_add_is_username_taken_function.sql new file mode 100644 index 00000000..bef9a0b6 --- /dev/null +++ b/supabase/migrations/20241011145739_add_is_username_taken_function.sql @@ -0,0 +1,14 @@ +CREATE OR REPLACE FUNCTION is_username_taken(given_username text) +RETURNS BOOLEAN AS $$ +DECLARE + is_username_taken BOOLEAN; +BEGIN + -- Check if the username exists in the profile table + SELECT EXISTS(SELECT 1 FROM public.profiles WHERE username = given_username) INTO is_username_taken; + + -- Return the result + RETURN is_username_taken; +END; +$$ +LANGUAGE plpgsql +SECURITY DEFINER; From 748548771c072600cb7d9cef6392f3ee74d4724c Mon Sep 17 00:00:00 2001 From: Jonas Jaszkowic Date: Wed, 16 Oct 2024 09:50:06 +0200 Subject: [PATCH 3/3] feat: improve sample env (#276) * feat: improve sample env * chore: path to pumps --- supabase/.env.sample | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/supabase/.env.sample b/supabase/.env.sample index bc6870a3..b36a7d5f 100644 --- a/supabase/.env.sample +++ b/supabase/.env.sample @@ -1,6 +1,13 @@ +# CORS settings ALLOWED_ORIGIN=http://localhost:5173 -SMTP_HOST=... -SMTP_USER=... -SMTP_PASSWORD=... -SMTP_FROM=... -SMTP_PORT=... \ No newline at end of file + +# The URL to the GeoJson file of the pumps +PUMPS_URL=http://127.0.0.1:54321/storage/v1/object/public/data_assets/pumps.geojson + +# SMTP settings for sending emails (for the contact feature) +SMTP_HOST=host.docker.internal +SMTP_USER="" +SMTP_PASSWORD="" +SMTP_FROM=your_mail@test.com +SMTP_PORT=1025 +SMTP_SECURE=false \ No newline at end of file