edge-ruedelasoif/src/routes/+layout.js

11 lines
355 B
JavaScript
Raw Normal View History

2024-02-23 20:48:46 +01:00
export async function load() {
let authid=await Edge.Client.rpc("getAuthid");
let authpseudo=await Edge.Client.rpc("getAuthpseudo");
let authisuser=await Edge.Client.rpc("getAuthisuser");
let player=await Edge.Client.rpc("initPlayer",{"_id":authid,"name":authpseudo,"isuser":(authisuser!="anon")});
return {
player,
};
}