Update routes and file paths, fix authentication and security issues
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-04-13 22:17:54 +02:00
parent 8f3e604774
commit 4e2e085a63
38 changed files with 1918 additions and 1408 deletions

View File

@@ -115,7 +115,7 @@ async function confirmDeleteFile(folderName, filename) {
if (confirmationResult.isConfirmed) {
try {
const response = await fetch(`/dpanel/dashboard/deletefile/${folderName}`, {
const response = await fetch(`/api/dpanel/dashboard/deletefile/${folderName}`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@@ -186,7 +186,7 @@ function getCurrentFolderName() {
function renameFolder(currentName, newName) {
try {
const currentFolderName = getCurrentFolderName();
const renameURL = `/dpanel/dashboard/renamefile/${currentFolderName}`;
const renameURL = `/api/dpanel/dashboard/renamefile/${currentFolderName}`;
fetch(renameURL, {
method: 'POST',
@@ -251,7 +251,7 @@ function renameFile(folderName, currentName) {
if (result.isConfirmed) {
const newName = result.value;
fetch(`/dpanel/dashboard/rename/${folderName}`, {
fetch(`/api/dpanel/dashboard/rename/${folderName}`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',