From 2a874a8c8a84688b2e9383f96261c39663231f4f Mon Sep 17 00:00:00 2001 From: marcin2121 <13873718+marcin2121@users.noreply.github.com> Date: Tue, 31 Mar 2026 19:31:15 +0000 Subject: [PATCH] refactor: remove unused interactWithUrwis function Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> --- app/actions/urwis-pet.ts | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 app/actions/urwis-pet.ts diff --git a/app/actions/urwis-pet.ts b/app/actions/urwis-pet.ts deleted file mode 100644 index 5257fd2..0000000 --- a/app/actions/urwis-pet.ts +++ /dev/null @@ -1,26 +0,0 @@ -// app/actions/urwis-pet.ts -'use server' - -import { createClient } from '@/lib/supabase/server'; -import { revalidatePath } from 'next/cache'; - -export async function interactWithUrwis(_actionType: 'feed' | 'play') { - const supabase = await createClient(); - if (!supabase) throw new Error('Konfiguracja Supabase jest nieprawidłowa.'); - const { data: { user } } = await supabase.auth.getUser(); - - if (!user) throw new Error('Musisz być zalogowany w Akademii Urwisa!'); - - // Logika aktualizacji stanu w zależności od czasu - // Punkty z grywalizacji trafiają do portfela "Złotych Urwisów" - const { _data, _error } = await supabase - .from('urwis_pet') - .update({ - last_interaction: new Date().toISOString(), - // Przykładowa logika: karmienie zwiększa hunger_level - }) - .eq('user_id', user.id); - - revalidatePath('/akademia'); - return { success: true }; -} \ No newline at end of file