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

@@ -104,7 +104,7 @@
}).then(async (result) => {
if (result.isConfirmed) {
try {
const response = await fetch(`/dpanel/dashboard/deletefolder/${folderName}`, {
const response = await fetch(`/api/dpanel/dashboard/deletefolder/${folderName}`, {
method: 'DELETE',
});
@@ -160,7 +160,7 @@
}).then(result => {
if (result.isConfirmed) {
const folderName = result.value.trim();
fetch('/dpanel/dashboard/newfolder', {
fetch('/api/dpanel/dashboard/newfolder', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@@ -342,7 +342,7 @@
}).then(async (result) => {
if (result.isConfirmed) {
try {
const response = await fetch('/dpanel/dashboard/delete', {
const response = await fetch('/api/dpanel/dashboard/delete', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@@ -405,7 +405,7 @@
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',

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',