From 69ecad68fb59b1ce1738ce1cc9b90d488477edca Mon Sep 17 00:00:00 2001 From: Dauren777 Date: Wed, 24 Jun 2026 10:52:53 +0000 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D1=81=D0=B8=D0=BD=D1=82=D0=B0=D0=BA=D1=81?= =?UTF-8?q?=D0=B8=D1=87=D0=B5=D1=81=D0=BA=D0=B0=D1=8F=20=D0=BE=D1=88=D0=B8?= =?UTF-8?q?=D0=B1=D0=BA=D0=B0=20=E2=80=94=20=D0=BB=D0=B8=D1=88=D0=BD=D1=8F?= =?UTF-8?q?=D1=8F=20};=20=D0=BB=D0=BE=D0=BC=D0=B0=D0=BB=D0=B0=20=D0=B2?= =?UTF-8?q?=D0=B5=D1=81=D1=8C=20JS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/index.html b/index.html index 595eeb3..49fc1fb 100644 --- a/index.html +++ b/index.html @@ -68,7 +68,6 @@ document.getElementById('lb').onclick=function(){ var SBU="https://znexbjafkvyjffffbhlf.supabase.co",SBK="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InpuZXhiamFma3Z5amZmZmZiaGxmIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImlhdCI6MTc4MDY0NDE4MiwiZXhwIjoyMDk2MjIwMTgyfQ.5pOYTkL5eCmpSHBY3EwKof6NVKt7tL4Fn8xUAKM8itE"; fetch(SBU+"/rest/v1/users?login=eq."+encodeURIComponent(u),{headers:{"apikey":SBK,"Authorization":"Bearer "+SBK}}).then(function(r){return r.json()}).then(function(d){if(d.length>0&&d[0].pass===p){var ud=d[0];doAppLogin(u,ud);users[u]={pass:ud.pass,name:ud.name,email:ud.email,role:ud.role,freq:ud.freq,branch:ud.branch,dept:ud.dept,region:ud.region,oblast:ud.oblast,city:ud.city};localStorage.setItem('pab_users',JSON.stringify(users))}else{btn.textContent='Войти';btn.disabled=false;document.getElementById('lerr').style.display='block'}}).catch(function(){btn.textContent='Войти';btn.disabled=false;document.getElementById('lerr').style.display='block'}); }; -}; document.getElementById('lp').onkeydown=function(e){if(e.key==='Enter')document.getElementById('lb').onclick()}; document.getElementById('rbb').onclick=function(){ var l=document.getElementById('rl').value.trim().toLowerCase(),p=document.getElementById('rp').value.trim(),n=document.getElementById('rn').value.trim(),em=document.getElementById('re').value.trim(),r=document.getElementById('rr').value,fr=document.getElementById('rf').value,br=document.getElementById('rb').value.trim(),dp=document.getElementById('rd').value.trim(),rg=document.getElementById('rg').value.trim(),ob=document.getElementById('ro').value.trim(),ct=document.getElementById('rc').value.trim(); @@ -83,17 +82,6 @@ document.getElementById('testBtn').onclick=function(){ fetch("https://znexbjafkvyjffffbhlf.supabase.co/rest/v1/users?select=login",{headers:{"apikey":SBK,"Authorization":"Bearer "+SBK}}).then(function(r){return r.json()}).then(function(d){if(Array.isArray(d))alert("✅ Supabase работает!\nПользователей: "+d.length+"\nЛогины: "+d.map(function(x){return x.login}).join(", "));else alert("❌ Ошибка: "+JSON.stringify(d))}).catch(function(e){alert("❌ Нет соединения: "+e)}); }; function testSupabase(){document.getElementById('testBtn').click();} -function testSupabase(){ - var SBU="https://znexbjafkvyjffffbhlf.supabase.co",SBK="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InpuZXhiamFma3Z5amZmZmZiaGxmIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImlhdCI6MTc4MDY0NDE4MiwiZXhwIjoyMDk2MjIwMTgyfQ.5pOYTkL5eCmpSHBY3EwKof6NVKt7tL4Fn8xUAKM8itE"; - // Тест: получить список пользователей - fetch(SBU+"/rest/v1/users?select=login",{headers:{"apikey":SBK,"Authorization":"Bearer "+SBK}}).then(function(r){return r.json()}).then(function(d){ - if(Array.isArray(d)){ - alert("✅ Supabase работает!\nПользователей в базе: "+d.length+"\nЛогины: "+d.map(function(x){return x.login}).join(", ")); - }else{ - alert("❌ Ошибка: "+JSON.stringify(d)); - } - }).catch(function(e){alert("❌ Нет соединения с Supabase: "+e.message)}); -}