// === SECURE MODE PATCH FOR CLOUDFLARE === const SECURE_BASE = ""; // same origin async function api(path, body){ let r = await fetch('/'+path, {method:'POST', headers:{'Content-Type':'application/json'}, body: JSON.stringify(body)}) let t = await r.text() let j; try{j=JSON.parse(t)}catch(e){throw new Error(t)} if(!r.ok) throw new Error(j.error||'API fail') return j } async function checkServer(){ return true; } async function pbGetAll(){ // actor is current logged user id let data = await api('functions/get_users', {actor_id: cur.id}) // map to USERS format expected by old code USERS = data.map(d=>({id:d.id, role:d.role, parent:d.parent, bal:d.balance, pb_id:d.id, password:d.password})) return USERS } async function pbCreate(obj){ return await api('functions/create_user', {actor_id: cur.id, id: obj.user_id, password: obj.password, role: obj.role, parent: obj.parent, balance: obj.balance||0}) } async function pbUpdate(pb_id, upd){ return await api('functions/secure_update', {actor_id: cur.id, target_id: pb_id, balance: upd.balance, password: upd.password}) } async function pbDelete(pb_id){ return await api('functions/secure_delete', {actor_id: cur.id, target_id: pb_id}) } // secure login async function secureLogin(id, pwd){ let u = await api('functions/login', {id:id, password:pwd}) return u }
📡
SERVER DOWN
Game server ke saath attach nahi hai
Internet on karo ya thodi der baad try karo
F
FRUIT GAME
SERVER CONNECTED MODE