We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c22980c commit 3052984Copy full SHA for 3052984
services/geminiService.ts
@@ -77,3 +77,19 @@ export const generatePodcastAudio = async (text: string) => {
77
console.log("Generuji audio pro:", text);
78
return "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3";
79
};
80
+
81
+export const verifyUserOnRPi = async (name: string, pass: string) => {
82
+ try {
83
+ const response = await fetch(`${TUNNEL_URL}/api/auth`, { // Nový endpoint na malině
84
+ method: 'POST',
85
+ headers: { 'Content-Type': 'application/json' },
86
+ body: JSON.stringify({ name, pass })
87
+ });
88
89
+ const data = await response.json();
90
+ return data.success; // Malina vrátí true nebo false
91
+ } catch (error) {
92
+ console.error("Chyba při ověřování na RPi:", error);
93
+ return false;
94
+ }
95
+};
0 commit comments