Move files request to files API

This commit is contained in:
amcmanu3 2023-06-04 20:55:48 -04:00
parent 1ff9bc9e83
commit 768d3c0d14
3 changed files with 6 additions and 6 deletions

View File

@ -32,8 +32,8 @@ from app.classes.web.routes.api.servers.server.backups.index import (
from app.classes.web.routes.api.servers.server.backups.backup.index import (
ApiServersServerBackupsBackupIndexHandler,
)
from app.classes.web.routes.api.servers.server.backups.files import (
ApiServersServerBackupsFilesIndexHandler,
from app.classes.web.routes.api.servers.server.files import (
ApiServersServerFilesIndexHandler,
)
from app.classes.web.routes.api.servers.server.tasks.task.children import (
ApiServersServerTasksTaskChildrenHandler,
@ -132,8 +132,8 @@ def api_handlers(handler_args):
handler_args,
),
(
r"/api/v2/servers/([0-9]+)/backups/files/?",
ApiServersServerBackupsFilesIndexHandler,
r"/api/v2/servers/([0-9]+)/files/?",
ApiServersServerFilesIndexHandler,
handler_args,
),
(

View File

@ -21,7 +21,7 @@ files_get_schema = {
}
class ApiServersServerBackupsFilesIndexHandler(BaseApiHandler):
class ApiServersServerFilesIndexHandler(BaseApiHandler):
def post(self, server_id: str):
auth_data = self.authenticate_user()
if not auth_data:

View File

@ -588,7 +588,7 @@
}
async function getTreeView(path){
var token = getCookie("_xsrf");
let res = await fetch(`/api/v2/servers/${server_id}/backups/files`, {
let res = await fetch(`/api/v2/servers/${server_id}/files`, {
method: 'POST',
headers: {
'X-XSRFToken': token