Update routes and file paths, fix authentication and security issues
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user