From dd31a8d040af79438f714cc7cd0553e96f53b531 Mon Sep 17 00:00:00 2001 From: Josh Creek <8179928+jcreek@users.noreply.github.com> Date: Sat, 26 Jul 2025 22:09:35 +0100 Subject: [PATCH 1/2] Update supabase/config.toml --- supabase/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supabase/config.toml b/supabase/config.toml index f0be590..86883e3 100644 --- a/supabase/config.toml +++ b/supabase/config.toml @@ -172,7 +172,7 @@ enable_confirmations = true # If enabled, users will need to reauthenticate or have logged in recently to change their password. secure_password_change = false # Controls the minimum amount of time that must pass before sending another signup confirmation or password reset email. -max_frequency = "1s" +max_frequency = "30s" # Number of characters used in the email OTP. otp_length = 6 # Number of seconds before the email OTP expires (defaults to 1 hour). From 120f936eb739577a9238ddf0b2ae2e6e460c2e66 Mon Sep 17 00:00:00 2001 From: Josh Creek <8179928+jcreek@users.noreply.github.com> Date: Sat, 26 Jul 2025 22:22:03 +0100 Subject: [PATCH 2/2] Update src/lib/repositories/CatchRecordRepository.ts --- src/lib/repositories/CatchRecordRepository.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/repositories/CatchRecordRepository.ts b/src/lib/repositories/CatchRecordRepository.ts index b9ddcf7..c3c22c9 100644 --- a/src/lib/repositories/CatchRecordRepository.ts +++ b/src/lib/repositories/CatchRecordRepository.ts @@ -140,11 +140,15 @@ class CatchRecordRepository { } async findByUserAndPokemon(userId: string, pokedexEntryId: string): Promise { + const numericId = Number(pokedexEntryId); + if (isNaN(numericId)) { + return null; + } const { data, error } = await this.supabase .from('catch_records') .select('*') .eq('userId', userId) - .eq('pokedexEntryId', pokedexEntryId) + .eq('pokedexEntryId', numericId) .single(); if (error || !data) return null;