Admin Panel storage

This commit is contained in:
michi 2025-08-26 15:05:13 +02:00
parent bb5e50a775
commit 8e92d758f9
18 changed files with 19 additions and 13 deletions

View File

@ -22,6 +22,11 @@
"static/chunks/main.js", "static/chunks/main.js",
"static/chunks/pages/_error.js" "static/chunks/pages/_error.js"
], ],
"/admin": [
"static/chunks/webpack.js",
"static/chunks/main.js",
"static/chunks/pages/admin.js"
],
"/admin/login": [ "/admin/login": [
"static/chunks/webpack.js", "static/chunks/webpack.js",
"static/chunks/main.js", "static/chunks/main.js",

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1 +1 @@
self.__BUILD_MANIFEST={"polyfillFiles":["static/chunks/polyfills.js"],"devFiles":["static/chunks/react-refresh.js"],"ampDevFiles":[],"lowPriorityFiles":["static/development/_buildManifest.js","static/development/_ssgManifest.js"],"rootMainFiles":[],"pages":{"/_app":["static/chunks/webpack.js","static/chunks/main.js","static/chunks/pages/_app.js"],"/_error":["static/chunks/webpack.js","static/chunks/main.js","static/chunks/pages/_error.js"],"/admin/login":["static/chunks/webpack.js","static/chunks/main.js","static/chunks/pages/admin/login.js"]},"ampFirstPages":[]} self.__BUILD_MANIFEST={"polyfillFiles":["static/chunks/polyfills.js"],"devFiles":["static/chunks/react-refresh.js"],"ampDevFiles":[],"lowPriorityFiles":["static/development/_buildManifest.js","static/development/_ssgManifest.js"],"rootMainFiles":[],"pages":{"/_app":["static/chunks/webpack.js","static/chunks/main.js","static/chunks/pages/_app.js"],"/_error":["static/chunks/webpack.js","static/chunks/main.js","static/chunks/pages/_error.js"],"/admin":["static/chunks/webpack.js","static/chunks/main.js","static/chunks/pages/admin.js"],"/admin/login":["static/chunks/webpack.js","static/chunks/main.js","static/chunks/pages/admin/login.js"]},"ampFirstPages":[]}

View File

@ -3,5 +3,5 @@
"/_error": "pages/_error.js", "/_error": "pages/_error.js",
"/_document": "pages/_document.js", "/_document": "pages/_document.js",
"/admin/login": "pages/admin/login.js", "/admin/login": "pages/admin/login.js",
"/api/auth": "pages/api/auth.js" "/admin": "pages/admin.js"
} }

View File

@ -1 +1 @@
self.__BUILD_MANIFEST = {__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/_error":["static\u002Fchunks\u002Fpages\u002F_error.js"],"/admin/login":["static\u002Fchunks\u002Fpages\u002Fadmin\u002Flogin.js"],sortedPages:["\u002F_app","\u002F_error","\u002Fadmin\u002Flogin"]};self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB() self.__BUILD_MANIFEST = {__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/_error":["static\u002Fchunks\u002Fpages\u002F_error.js"],"/admin":["static\u002Fchunks\u002Fpages\u002Fadmin.js"],"/admin/login":["static\u002Fchunks\u002Fpages\u002Fadmin\u002Flogin.js"],sortedPages:["\u002F_app","\u002F_error","\u002Fadmin","\u002Fadmin\u002Flogin"]};self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB()

File diff suppressed because one or more lines are too long

View File

@ -2,14 +2,9 @@
{ {
"date": "20. August 2025", "date": "20. August 2025",
"title": "Projektstart: Textbased Survival", "title": "Projektstart: Textbased Survival",
"description": "Wir haben mit der Entwicklung eines spannenden textbasierten Survival-Spiels begonnen.", "description": "Wir haben mit der Entwicklung eines spannenden textbasierten Survival-Spiels begonnen.212121",
"slug": "textbased-survival", "slug": "textbased-survival",
"image": "/assets/images/textbased-survival.png", "image": "/assets/images/textbased-survival.png",
"content": [ "content": []
{
"type": "text",
"value": "asdasdasdasdasdasdasd"
}
]
} }
] ]

View File

@ -33,7 +33,7 @@ export default function handler(req, res) {
return res.status(500).json({ message: 'Keine Schreibberechtigung für Verzeichnis', error: permError.message }); return res.status(500).json({ message: 'Keine Schreibberechtigung für Verzeichnis', error: permError.message });
} }
// Stelle sicher, dass jeder Eintrag ein content-Array hat // Stelle sicher, dass jeder Eintrag ein content-Array hat und entferne unerwünschte Felder
const updatedData = req.body.map((entry, index) => { const updatedData = req.body.map((entry, index) => {
console.log(`Verarbeite Eintrag ${index}:`, entry); console.log(`Verarbeite Eintrag ${index}:`, entry);
@ -43,9 +43,12 @@ export default function handler(req, res) {
throw new Error(`Eintrag ${index} fehlen erforderliche Felder`); throw new Error(`Eintrag ${index} fehlen erforderliche Felder`);
} }
// Entferne unerwünschte Felder wie editIndex, index etc.
const { editIndex, index: entryIndex, ...cleanEntry } = entry;
return { return {
...entry, ...cleanEntry,
content: entry.content || [] content: cleanEntry.content || []
}; };
}); });