webupdate
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Settings - Sky Art Shop Admin</title>
|
||||
<link rel="icon" type="image/png" href="/admin/favicon.png" />
|
||||
<link
|
||||
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css"
|
||||
rel="stylesheet"
|
||||
@@ -1163,13 +1164,14 @@
|
||||
// Load settings
|
||||
async function loadSettings() {
|
||||
try {
|
||||
const response = await fetch("/api/settings", {
|
||||
const response = await fetch("/api/admin/settings", {
|
||||
credentials: "include",
|
||||
});
|
||||
|
||||
if (!response.ok) throw new Error("Failed to load settings");
|
||||
|
||||
settings = await response.json();
|
||||
const data = await response.json();
|
||||
settings = data.settings || {};
|
||||
populateForm();
|
||||
} catch (error) {
|
||||
console.error("Error loading settings:", error);
|
||||
@@ -1406,8 +1408,8 @@
|
||||
};
|
||||
|
||||
try {
|
||||
const response = await fetch("/api/settings", {
|
||||
method: "PUT",
|
||||
const response = await fetch("/api/admin/settings", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
credentials: "include",
|
||||
body: JSON.stringify(data),
|
||||
|
||||
Reference in New Issue
Block a user