From 209356b8ade1920b50d1d3a1a5e121c6623d167b Mon Sep 17 00:00:00 2001 From: Minteck Date: Fri, 11 Nov 2022 23:47:49 +0100 Subject: Update --- pages/docs.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pages/docs.inc') diff --git a/pages/docs.inc b/pages/docs.inc index 0322f32..6d01489 100644 --- a/pages/docs.inc +++ b/pages/docs.inc @@ -22,7 +22,7 @@ if ($select === "add") { die(); } elseif (isset($select)) { if (ctype_alnum($select) && file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/docs/" . $select . ".json")) { - $id = $select; + $id = $_documentId = $select; $data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/docs/" . $select . ".json"), true); $titleBase = " · " . $title . " · Cold Haze"; $title = $data["name"] . " · " . $title; @@ -141,7 +141,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc'; saving = true; try { - await window.fetch("/api/docs?id=", { + await window.fetch("/api/docs?id=", { method: "POST", body: JSON.stringify({ content: data, name: document.getElementById("document-name").innerText, category: document.getElementById("category").innerText }) }); @@ -289,7 +289,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc';
-

Marked for deletion

+

Marked for deletion