auth
All checks were successful
Build Org Website / build (push) Successful in 49s

This commit is contained in:
2026-05-09 00:26:04 +01:00
parent a504eb9179
commit a18debbf21
327 changed files with 66 additions and 16 deletions

View File

@@ -96,8 +96,8 @@
async function loadMotalah() {
try {
const [mRes, bRes] = await Promise.all([
fetch(MOTALAH_API),
fetch(CALIBRE_API),
window.orgAuth.fetch(MOTALAH_API),
window.orgAuth.fetch(CALIBRE_API),
]);
if (mRes.ok) motalahEntries = await mRes.json();
if (bRes.ok) calibreBooks = await bRes.json();
@@ -301,7 +301,7 @@
notes: motalahNotesEl.value.trim() || null,
};
try {
const r = await fetch(MOTALAH_API, {
const r = await window.orgAuth.fetch(MOTALAH_API, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
@@ -350,7 +350,7 @@
async function loadAll() {
try {
const r = await fetch(`${API}/entries`);
const r = await window.orgAuth.fetch(`${API}/entries`);
if (!r.ok) throw new Error(r.status);
allEntries = await r.json();
buildTodayMap();
@@ -383,7 +383,7 @@
}
async function postEntry(payload) {
const r = await fetch(`${API}/entries`, {
const r = await window.orgAuth.fetch(`${API}/entries`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
@@ -393,7 +393,7 @@
}
async function deleteEntry(id) {
const r = await fetch(`${API}/entries/${id}`, { method: "DELETE" });
const r = await window.orgAuth.fetch(`${API}/entries/${id}`, { method: "DELETE" });
if (!r.ok) throw new Error(await r.text());
}