prep for prod

This commit is contained in:
JCEEE
2026-08-18 08:19:46 +01:00
parent 69a233f1dc
commit 29cb6a3ea5
3 changed files with 9 additions and 5 deletions
+3 -1
View File
@@ -4,7 +4,9 @@ const PB_ENDPOINT = import.meta.env.PROD ? '/pb' : `http://${SERVER_IP}:8090`;
export const pb = new PocketBase(PB_ENDPOINT);
pb.autoCancellation(false);
export function initPb(token: string) {
// Seed the browser PB singleton with the session token so shared stores can
// do authenticated reads + realtime .subscribe() from the client.
export function initRealtimePb(token: string) {
if (token) {
pb.authStore.save(token, null);
return true;